/**
 * Modern Tabbed Dashboard Styles
 *
 * @package Thinkific_WP
 */

/* ===================================
   1. DASHBOARD WRAPPER & LAYOUT
   =================================== */

.thinkific-dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
}

/* ===================================
   2. DASHBOARD HEADER
   =================================== */

.thinkific-dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px 30px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.thinkific-dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thinkific-dashboard-user-welcome h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.thinkific-dashboard-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    color: #fff;
}

.thinkific-dashboard-user-avatar {
    flex-shrink: 0;
}

.thinkific-avatar {
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* ===================================
   3. DASHBOARD NAVIGATION TABS
   =================================== */

.thinkific-dashboard-nav {
    background: #fff;
    border-bottom: 1px solid #e1e4e8;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.thinkific-tabs-nav {
    display: flex;
    gap: 8px;
    padding: 0 30px;
    overflow-x: auto;
}

.thinkific-tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    text-decoration: none;
    color: #586069;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.thinkific-tab-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.thinkific-tab-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.thinkific-tab-link .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.thinkific-tab-badge {
    background: #667eea;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.thinkific-tab-link.active .thinkific-tab-badge {
    background: #764ba2;
}

/* ===================================
   4. DASHBOARD CONTENT AREA
   =================================== */

.thinkific-dashboard-content {
    padding: 0 30px 40px 30px;
    background: #f5f7fa;
}

.thinkific-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.thinkific-tab-header {
    margin-bottom: 30px;
}

.thinkific-tab-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.thinkific-tab-description {
    margin: 0;
    color: #586069;
    font-size: 15px;
}

/* ===================================
   5. STAT CARDS (Overview Tab)
   =================================== */

.thinkific-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.thinkific-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.thinkific-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.thinkific-stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.thinkific-stat-card-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.thinkific-stat-icon-courses {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.thinkific-stat-icon-completed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.thinkific-stat-icon-orders {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: #fff;
}

.thinkific-stat-icon-thinkific {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: #fff;
}

.thinkific-stat-card-content {
    flex: 1;
}

.thinkific-stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 4px;
}

.thinkific-stat-card-label {
    font-size: 13px;
    color: #586069;
    font-weight: 500;
}

/* ===================================
   6. DASHBOARD ROW & COL LAYOUT
   =================================== */

.thinkific-dashboard-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.thinkific-dashboard-col {
    min-width: 0;
}

.thinkific-col-4 { grid-column: span 4; }
.thinkific-col-8 { grid-column: span 8; }
.thinkific-col-12 { grid-column: span 12; }

/* ===================================
   7. CARD COMPONENT
   =================================== */

.thinkific-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.thinkific-card-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e4e8;
}

.thinkific-card-header-simple h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.thinkific-link-view-all {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.thinkific-link-view-all:hover {
    text-decoration: underline;
}

.thinkific-card-body {
    padding: 24px;
}

/* ===================================
   8. RECENT COURSES (Compact View)
   =================================== */

.thinkific-recent-courses {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thinkific-course-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f6f8fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.thinkific-course-compact:hover {
    background: #e1e4e8;
}

.thinkific-course-compact-info {
    flex: 1;
    min-width: 0;
}

.thinkific-course-compact-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.thinkific-course-compact-info p {
    margin: 0;
    font-size: 13px;
    color: #586069;
}

.thinkific-course-compact .button {
    flex-shrink: 0;
}

/* ===================================
   9. ACCOUNT INFO
   =================================== */

.thinkific-account-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thinkific-account-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thinkific-account-info-label {
    font-size: 12px;
    color: #586069;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thinkific-account-info-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

/* ===================================
   10. MODERN COURSE CARDS (Grid View)
   =================================== */

.thinkific-courses-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.thinkific-course-card-modern {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.thinkific-course-card-modern:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.thinkific-course-card-modern.enrolled {
    border-color: #d4edda;
}

.thinkific-course-card-modern.pending {
    border-color: #fff3cd;
}

.thinkific-course-card-status {
    margin-bottom: 16px;
}

.thinkific-status-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thinkific-status-badge-modern .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.thinkific-status-badge-modern.success {
    background: #d4edda;
    color: #155724;
}

.thinkific-status-badge-modern.pending {
    background: #fff3cd;
    color: #856404;
}

.thinkific-course-card-content {
    flex: 1;
    margin-bottom: 20px;
}

.thinkific-course-card-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.thinkific-course-card-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #586069;
    line-height: 1.6;
}

.thinkific-course-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #586069;
}

.thinkific-course-card-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #667eea;
}

.thinkific-course-card-actions {
    margin-top: auto;
}

.thinkific-course-btn-launch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    transition: all 0.2s ease;
}

.thinkific-course-btn-launch:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65407d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.thinkific-course-btn-launch .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.thinkific-course-card-help {
    margin: 12px 0 0 0;
    padding: 10px;
    background: #fff8e5;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 6px;
}

.thinkific-course-card-help .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ===================================
   11. ORDERS TAB
   =================================== */

.thinkific-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thinkific-order-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.2s ease;
}

.thinkific-order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.thinkific-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f6f8fa;
    border-bottom: 1px solid #e1e4e8;
}

.thinkific-order-number {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thinkific-order-number strong {
    font-size: 16px;
    color: #1a1a1a;
}

.thinkific-order-date {
    font-size: 13px;
    color: #586069;
}

.thinkific-order-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.thinkific-status-completed {
    background: #d4edda;
    color: #155724;
}

.thinkific-status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.thinkific-status-pending {
    background: #fff3cd;
    color: #856404;
}

.thinkific-order-body {
    padding: 24px;
}

.thinkific-order-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.thinkific-order-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1a1a1a;
}

.thinkific-order-item .dashicons {
    color: #667eea;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.thinkific-order-item-qty {
    margin-left: auto;
    color: #586069;
}

.thinkific-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e1e4e8;
}

.thinkific-order-total {
    font-size: 18px;
    color: #1a1a1a;
}

/* ===================================
   12. COMMUNITY TAB
   =================================== */

.thinkific-community-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.thinkific-community-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.thinkific-discord-card {
    border: 2px solid #5865F2;
}

.thinkific-community-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: #fff;
}

.thinkific-discord-card .thinkific-community-card-icon {
    background: #5865F2;
}

.thinkific-community-card h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.thinkific-community-card p {
    margin: 0 0 20px 0;
    color: #586069;
    line-height: 1.6;
}

.thinkific-community-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.thinkific-status-connected {
    background: #d4edda;
    color: #155724;
}

.thinkific-status-disconnected {
    background: #f8d7da;
    color: #721c24;
}

/* ===================================
   13. EMPTY STATES
   =================================== */

.thinkific-empty-state,
.thinkific-empty-state-large {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}

.thinkific-empty-state-large {
    padding: 100px 20px;
}

.thinkific-empty-state .dashicons,
.thinkific-empty-state-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #d1d5da;
    margin-bottom: 20px;
}

.thinkific-empty-state-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: #f6f8fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thinkific-empty-state h3,
.thinkific-empty-state-large h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.thinkific-empty-state p,
.thinkific-empty-state-large p {
    margin: 0 0 24px 0;
    color: #586069;
    font-size: 15px;
}

/* ===================================
   14. LOGIN PAGE
   =================================== */

.thinkific-login-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.thinkific-login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 440px;
    width: 100%;
    overflow: hidden;
}

.thinkific-login-header {
    padding: 40px 32px 32px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.thinkific-login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.thinkific-login-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.thinkific-login-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.thinkific-login-header p {
    margin: 0;
    color: #586069;
    font-size: 15px;
}

.thinkific-login-body {
    padding: 32px;
}

.thinkific-login-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thinkific-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid #e1e4e8;
    background: #fff;
    color: #1a1a1a;
}

.thinkific-login-btn:hover {
    border-color: #d1d5da;
    background: #f6f8fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thinkific-login-email .dashicons {
    color: #667eea;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.thinkific-login-google {
    border-color: #4285F4;
}

.thinkific-login-google:hover {
    background: rgba(66, 133, 244, 0.05);
    border-color: #4285F4;
}

.thinkific-login-discord {
    border-color: #5865F2;
}

.thinkific-login-discord:hover {
    background: rgba(88, 101, 242, 0.05);
    border-color: #5865F2;
}

.thinkific-login-icon-svg {
    flex-shrink: 0;
}

.thinkific-login-divider {
    margin: 24px 0;
    text-align: center;
    position: relative;
}

.thinkific-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e4e8;
}

.thinkific-login-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    color: #586069;
    font-size: 13px;
}

.thinkific-register-text {
    margin: 0;
    text-align: center;
    font-size: 14px;
    color: #586069;
}

.thinkific-register-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.thinkific-register-link:hover {
    text-decoration: underline;
}

/* ===================================
   15. RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .thinkific-dashboard-wrapper {
        background: #fff;
    }
    
    .thinkific-dashboard-header {
        padding: 30px 20px;
        border-radius: 0;
    }
    
    .thinkific-dashboard-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .thinkific-dashboard-user-welcome h1 {
        font-size: 24px;
    }
    
    .thinkific-tabs-nav {
        padding: 0 20px;
    }
    
    .thinkific-tab-text {
        display: none;
    }
    
    .thinkific-tab-link {
        padding: 16px 12px;
    }
    
    .thinkific-dashboard-content {
        padding: 20px;
    }
    
    .thinkific-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .thinkific-dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .thinkific-col-4,
    .thinkific-col-8 {
        grid-column: span 1;
    }
    
    .thinkific-courses-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .thinkific-course-compact {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .thinkific-order-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .thinkific-order-footer {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .thinkific-dashboard-header {
        padding: 20px 16px;
    }
    
    .thinkific-dashboard-user-welcome h1 {
        font-size: 20px;
    }
    
    .thinkific-dashboard-subtitle {
        font-size: 14px;
    }
    
    .thinkific-tab-header h2 {
        font-size: 22px;
    }
    
    .thinkific-stat-card {
        padding: 16px;
    }
    
    .thinkific-stat-card-icon {
        width: 48px;
        height: 48px;
    }
    
    .thinkific-stat-card-value {
        font-size: 24px;
    }
}

/* ===================================
   16. ACCESSIBILITY & UTILITIES
   =================================== */

.thinkific-dashboard-wrapper *:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.button-small {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

.button-large {
    padding: 16px 32px !important;
    font-size: 16px !important;
}

/* Print Styles */
@media print {
    .thinkific-dashboard-nav,
    .thinkific-tab-link,
    .button {
        display: none !important;
    }
}
