/**
 * Hello EAD Dark - Custom Styles
 * Tema dark moderno para plataforma EAD
 */

/* ========================================
   VARIÁVEIS CSS
======================================== */
:root {
    /* Cores principais - Paleta do usuário */
    --primary-color: #9964a5; /* Títulos e links */
    --secondary-color: #5d2e6b; /* Hover/link secundário */
    --gradient-purple: linear-gradient(135deg, #41174f 0%, #5d2e6b 100%);
    
    /* Cores de fundo */
    --bg-dark: #171717; /* Fundo geral */
    --panel-bg: #1f1f1f; /* Painéis/cartões */
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.05);
    
    /* Cores de texto */
    --text-light: #e1e1e1;
    --text-white: #ffffff;
    --text-muted: #8b949e;
    
    /* Cores de acento */
    --neon-purple: #9964a5;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-border: rgba(142, 45, 226, 0.5);
    
    /* Efeitos */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --btn-radius: 10px;
    --transition-fast: all 0.2s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    --box-shadow-hover: 0 8px 25px rgba(142, 45, 226, 0.3);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    
    /* Tipografia */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* ========================================
   RESET E BASE
======================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* Fundo e texto dark apenas nas páginas do Tutor LMS */
body.single-courses,
body.tutor-dashboard,
body.post-type-archive-courses,
.tutor-wrap {
    background-color: var(--bg-dark) !important;
    color: var(--text-light) !important;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* ========================================
   BOTÕES
======================================== */
.btn-gradient,
.open-checkout-modal,
.tutor-btn-primary,
.tutor-btn,
.btn-primary,
.button.alt,
.button-primary,
.wc-proceed-to-checkout .checkout-button,
button[type="submit"],
input[type="submit"],
.tutor-button,
.tutor-course-enroll-btn,
.elementor-button {
    background: #41174f !important;
    border: none !important;
    color: var(--text-white) !important;
    padding: 14px 28px;
    border-radius: var(--btn-radius);
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.btn-gradient:hover,
.open-checkout-modal:hover,
.tutor-btn-primary:hover,
.button.alt:hover,
.wc-proceed-to-checkout .checkout-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.tutor-button:hover,
.tutor-course-enroll-btn:hover,
.elementor-button:hover {
    background: var(--gradient-purple) !important;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
    color: var(--text-white) !important;
}

.btn-gradient:before,
.open-checkout-modal:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn-gradient:hover:before,
.open-checkout-modal:hover:before {
    left: 100%;
}

/* ========================================
   CARDS DE CURSO
======================================== */
.tutor-course-card,
.course-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    position: relative;
}

.tutor-course-card:hover,
.course-card:hover {
    transform: translateY(-8px);
    border-color: var(--hover-border);
    box-shadow: var(--box-shadow-hover);
}

.tutor-course-card::before,
.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-purple);
    opacity: 0;
    transition: var(--transition);
}

.tutor-course-card:hover::before,
.course-card:hover::before {
    opacity: 1;
}

.tutor-course-card-body,
.course-card-body {
    padding: 24px;
}

.tutor-course-card-title,
.course-card-title {
    color: var(--text-white);
    font-weight: var(--font-weight-semibold);
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.tutor-course-card-meta,
.course-card-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ========================================
   MODAL DE CHECKOUT
======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
    z-index: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close-modal:hover {
    color: var(--primary-color);
    background: rgba(142, 45, 226, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 40px;
}

/* ========================================
   DASHBOARD DO TUTOR LMS
======================================== */
.tutor-dashboard-wrap {
    background: var(--bg-dark) !important;
    min-height: 100vh;
    color: var(--text-light);
}

.tutor-dashboard {
    background: var(--bg-dark) !important;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
}

.tutor-dashboard-sidebar {
    background: var(--panel-bg) !important;
    border-right: 1px solid var(--border-color);
    min-height: 100vh !important;
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    padding: 0 !important;
    overflow-y: auto;
}

.tutor-dashboard-permalinks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tutor-dashboard-permalinks li {
    margin: 0;
}

/* Estilo dos links do sidebar */
.tutor-dashboard-permalinks a,
.tutor-dashboard-permalinks li a {
    display: flex !important;
    align-items: center;
    padding: 18px 25px !important;
    color: var(--text-light) !important;
    text-decoration: none !important;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    margin: 0 !important;
    background: transparent !important;
}

.tutor-dashboard-permalinks a:hover,
.tutor-dashboard-permalinks a.active,
.tutor-dashboard-permalinks li a:hover,
.tutor-dashboard-permalinks li.active a {
    color: var(--text-white) !important;
    background: var(--gradient-purple) !important;
    border-left-color: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(142, 45, 226, 0.3);
    transform: translateX(5px);
}

.tutor-dashboard-permalinks a i,
.tutor-dashboard-permalinks li a i {
    margin-right: 12px;
    font-size: 16px;
    color: var(--neon-purple);
    width: 20px;
    text-align: center;
}

/* Conteúdo principal do dashboard */
.tutor-dashboard-content,
.tutor-dashboard-content-wrap {
    background: var(--bg-dark) !important;
    margin-left: 280px !important;
    padding: 30px !important;
    min-height: 100vh;
    color: var(--text-light) !important;
}

.tutor-dashboard-content-inner {
    background: var(--glass-bg) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px !important;
    color: var(--text-light) !important;
}

/* Cards de progresso */
.tutor-dashboard-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tutor-dashboard-info-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.tutor-dashboard-info-card:hover {
    transform: translateY(-5px);
    border-color: var(--hover-border);
    box-shadow: var(--box-shadow-hover);
}

.tutor-dashboard-info-card h3 {
    color: var(--text-white);
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 10px 0;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tutor-dashboard-info-card p {
    color: var(--text-muted);
    margin: 0;
    font-weight: var(--font-weight-medium);
}

/* ========================================
   PÁGINA INDIVIDUAL DO CURSO
======================================== */
.tutor-wrap,
.tutor-single-course-wrap,
.tutor-course-details-wrap {
    background: var(--bg-dark) !important;
    color: var(--text-light) !important;
    min-height: 100vh;
}

.tutor-course-single-content-wrapper,
.tutor-single-course-segment {
    background: var(--panel-bg) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px !important;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    color: var(--text-light) !important;
}

.tutor-course-single-sidebar,
.tutor-single-course-sidebar {
    background: var(--panel-bg) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    backdrop-filter: blur(10px);
    color: var(--text-light) !important;
}

/* Títulos do curso */
.tutor-course-single-title,
.entry-title,
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color) !important;
}

/* Texto do corpo */
.tutor-course-single-excerpt,
.tutor-wrap .entry-content,
body.single-courses .entry-content {
    color: var(--text-light) !important;
}

/* Player de vídeo */
.tutor-video-player {
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(142, 45, 226, 0.3);
}

/* Tabs de conteúdo */
.tutor-course-single-nav-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tutor-course-single-nav-tabs .nav-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 15px 25px;
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
}

.tutor-course-single-nav-tabs .nav-link:hover,
.tutor-course-single-nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: rgba(142, 45, 226, 0.1);
    border-bottom: 2px solid var(--primary-color);
}

/* ========================================
   ÁREA DE AULAS - SIDEBAR DARK COM ACCORDION
======================================== */
.tutor-lesson-sidebar,
.tutor-course-topic-item,
.tutor-course-curriculum,
.tutor-course-curriculum-wrap {
    background: var(--panel-bg) !important;
    color: var(--text-light) !important;
    border: 1px solid var(--border-color) !important;
}

/* Sidebar do conteúdo do curso */
.tutor-course-content-list-item,
.tutor-course-content-list {
    background: var(--panel-bg) !important;
    border: none !important;
    color: var(--text-light) !important;
}

/* Módulos do curso - Accordion Style */
.tutor-course-topic {
    background: var(--glass-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    margin-bottom: 10px !important;
    overflow: hidden;
}

.tutor-course-topic-title {
    background: var(--panel-bg) !important;
    color: var(--text-white) !important;
    padding: 15px 20px !important;
    font-weight: var(--font-weight-semibold) !important;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tutor-course-topic-title:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

.tutor-course-topic-title::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.tutor-course-topic.active .tutor-course-topic-title::after {
    transform: rotate(180deg);
}

/* Lista de aulas dentro do módulo */
.tutor-course-lesson,
.tutor-course-lesson-item {
    background: var(--bg-dark) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-light) !important;
    padding: 12px 20px !important;
    transition: var(--transition-fast);
}

.tutor-course-lesson:hover,
.tutor-course-lesson-item:hover {
    background: rgba(142, 45, 226, 0.1) !important;
    border-left: 3px solid var(--primary-color);
    padding-left: 17px !important;
}

.tutor-course-lesson a,
.tutor-course-lesson-item a {
    color: var(--text-light) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutor-course-lesson a:hover,
.tutor-course-lesson-item a:hover {
    color: var(--primary-color) !important;
}

.tutor-course-lesson.is-completed,
.tutor-course-lesson-item.is-completed {
    background: rgba(46, 204, 113, 0.1) !important;
}

.tutor-course-lesson.is-completed a,
.tutor-course-lesson-item.is-completed a {
    color: #2ecc71 !important;
}

/* Ícones das aulas */
.tutor-course-lesson::before,
.tutor-course-lesson-item::before {
    content: '\f04b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 8px;
}

.tutor-course-lesson.is-completed::before,
.tutor-course-lesson-item.is-completed::before {
    content: '\f00c';
    color: #2ecc71;
}

/* ========================================
   BARRA DE PROGRESSO
======================================== */
.tutor-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    height: 10px;
    overflow: hidden;
    position: relative;
}

.tutor-progress-value {
    background: var(--gradient-purple);
    height: 100%;
    border-radius: 50px;
    transition: width 0.6s ease;
    position: relative;
}

.tutor-progress-value::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================
   WOOCOMMERCE
======================================== */
.woocommerce {
    color: var(--text-light);
}

.woocommerce-checkout {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
}

.woocommerce-form-row input,
.woocommerce-form-row select,
.woocommerce-form-row textarea {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-family: var(--font-family);
    transition: var(--transition-fast);
}

.woocommerce-form-row input:focus,
.woocommerce-form-row select:focus,
.woocommerce-form-row textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.2);
    outline: none;
}

.woocommerce-form-row label {
    color: var(--text-light);
    font-weight: var(--font-weight-medium);
    margin-bottom: 8px;
    display: block;
}

/* ========================================
   FORMULÁRIOS
======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-family: var(--font-family);
    font-size: 14px;
    transition: var(--transition-fast);
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(142, 45, 226, 0.2);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

/* ========================================
   TABELAS
======================================== */
table {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

table th {
    background: var(--panel-bg);
    color: var(--text-white);
    font-weight: var(--font-weight-semibold);
    padding: 15px;
    text-align: left;
}

table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ========================================
   ALERTAS E NOTIFICAÇÕES
======================================== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    background: var(--glass-bg);
    border-left: 4px solid var(--primary-color);
    color: var(--text-light);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: var(--border-radius-sm);
}

.woocommerce-error {
    border-left-color: #e74c3c;
}

/* ========================================
   RESPONSIVIDADE
======================================== */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .tutor-dashboard {
        flex-direction: column;
    }
    
    .tutor-dashboard-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .tutor-dashboard-permalinks a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .tutor-course-single-content-wrapper {
        padding: 20px;
    }
    
    .btn-gradient,
    .open-checkout-modal {
        padding: 12px 24px;
        font-size: 13px;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    :root {
        --border-radius: 8px;
        --border-radius-lg: 12px;
    }
    
    .tutor-dashboard-info-cards {
        grid-template-columns: 1fr;
    }
    
    .close-modal {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}

/* ========================================
   ANIMAÇÕES EXTRAS
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* ========================================
   ESTILOS GLOBAIS TUTOR LMS DARK
======================================== */
/* Forçar fundo dark em todas as páginas do Tutor */
body.single-courses,
body.tutor-dashboard,
body.post-type-archive-courses,
.tutor-wrap {
    background: var(--bg-dark) !important;
    color: var(--text-light) !important;
}

/* Headers e containers principais */
.tutor-container,
.container-fluid,
.tutor-course-container {
    background: var(--bg-dark) !important;
    color: var(--text-light) !important;
}

/* Botões específicos do dashboard */
.tutor-dashboard .btn,
.tutor-dashboard button,
.tutor-dashboard .button,
.tutor-dashboard input[type="submit"] {
    background: var(--gradient-purple) !important;
    color: white !important;
    border: none !important;
}

/* Progresso do curso */
.tutor-course-completion-progress {
    background: var(--panel-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    padding: 20px !important;
    color: var(--text-light) !important;
}

/* Player de vídeo na área de aulas */
.tutor-lesson-video,
.tutor-video-wrap {
    background: var(--bg-dark) !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: var(--border-radius) !important;
}

/* ========================================
   ELEMENTOR COMPATIBILITY
======================================== */
.elementor-widget-container {
    color: var(--text-light);
}

.elementor-heading-title {
    color: var(--text-white);
}

.elementor-button {
    background: var(--gradient-purple) !important;
    border: none !important;
    border-radius: 50px !important;
    font-family: var(--font-family) !important;
    font-weight: var(--font-weight-semibold) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: var(--transition) !important;
}

.elementor-button:hover {
    background: linear-gradient(135deg, #4a00e0 0%, #8e2de2 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--box-shadow-hover) !important;
}
