/* Tony Khan Mode & Tab Manager Styles */

/* Main Tab Navigation */
.main-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, var(--aew-bg), var(--aew-card));
    border-bottom: 2px solid var(--aew-gold, #F0A500);
    margin-bottom: 0.5rem;
    overflow-x: auto;
}

.main-tab-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    border-radius: 0.5rem 0.5rem 0 0;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 500;
}

.main-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.main-tab-btn.active {
    background: var(--aew-gold, #F0A500);
    color: black;
    font-weight: bold;
    border-color: var(--aew-gold, #F0A500);
}

/* Sub-tabs */
.sub-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    overflow-x: auto;
}

.sub-tab-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sub-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sub-tab-btn.active {
    background: rgba(255, 215, 0, 0.2);
    color: var(--aew-gold, #F0A500);
    border-color: var(--aew-gold, #F0A500);
}

/* Tony Khan Mode Specific */
.tk-mode {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

#tonykhan-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.tk-header {
    background: linear-gradient(135deg, var(--aew-card), var(--aew-bg));
    border: 2px solid var(--aew-gold, #F0A500);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.tk-header h2 {
    margin: 0 0 1rem 0;
    color: var(--aew-gold, #F0A500);
    font-size: 1.5rem;
}

/* Stat Bars */
.stat-bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .stat-bars {
        grid-template-columns: 1fr;
    }
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-bar span {
    min-width: 80px;
    font-size: 0.9rem;
}

.bar-container {
    flex: 1;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    transition: width 0.3s ease;
}

.bar.energy {
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
}

.bar.stress {
    background: linear-gradient(90deg, #22c55e, #f59e0b, #ef4444);
}

.bar.hours {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

/* Relationships Mini Display */
.relationships-mini {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.relationships-mini span {
    cursor: help;
}

/* Schedule Container */
.schedule-container {
    background: var(--aew-card, #2a2a2a);
    border: 1px solid var(--aew-line, #444);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.schedule-container h3 {
    margin: 0 0 1rem 0;
    color: var(--aew-gold, #F0A500);
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s;
}

.task:hover:not(.completed) {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.task.completed {
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.3);
}

.task-mandatory {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.task-important {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.task-optional {
    border-left: 4px solid #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.task-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.urgency-icon {
    font-size: 1.25rem;
}

.task-title {
    flex: 1;
    font-weight: 600;
    color: white;
}

.task-time {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.task-description {
    color: #aaa;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.task-status {
    color: #22c55e;
    font-weight: 600;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-actions button {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
}

/* All Done State */
.all-done {
    text-align: center;
    padding: 2rem;
    background: rgba(34, 197, 94, 0.1);
    border: 2px dashed #22c55e;
    border-radius: 0.5rem;
}

.all-done p {
    font-size: 1.25rem;
    color: #22c55e;
    margin-bottom: 1rem;
}

/* Coming Soon */
.coming-soon {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px dashed var(--aew-gold, #F0A500);
}

.coming-soon h2 {
    color: var(--aew-gold, #F0A500);
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    margin: 1.5rem auto;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--aew-gold, #F0A500), #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-weight: bold;
}

.coming-soon ul {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.coming-soon li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        border-bottom: none;
        border-top: 2px solid var(--aew-gold, #F0A500);
        background: var(--aew-bg);
    }
    
    .main-tab-btn .tab-label {
        display: none;
    }
    
    .main-tab-btn {
        padding: 1rem;
        font-size: 1.5rem;
    }
    
    .tk-mode {
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    .stat-bars {
        grid-template-columns: 1fr;
    }
    
    .relationships-mini {
        flex-wrap: wrap;
    }
    
    .task-actions {
        flex-direction: column;
    }
    
    .task-actions button {
        width: 100%;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .stat-bars {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Enhancement */
@media (prefers-color-scheme: dark) {
    .tk-header {
        background: linear-gradient(135deg, #0a0a0a, var(--aew-bg));
    }
    
    .task {
        background: rgba(255, 255, 255, 0.02);
    }
}

/* Animation Classes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task {
    animation: slideIn 0.3s ease-out;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #aaa;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}