/* =================================================================
   DASHBOARD PAGE STYLING
   Dashboard with favorites, top rated, and recent exercises
   ================================================================= */

/* Dashboard Main Container */
.dashboard-main {
    padding-top: 100px; /* Space for fixed header */
}

/* Welcome Section */
.dashboard-welcome {
    background: linear-gradient(135deg, #d9ed92 0%, #99d98c 50%, #52b788 100%);
    border-radius: var(--radius);
    padding: var(--space-8) var(--space-6);
    margin-bottom: var(--space-8);
    text-align: center;
    box-shadow: var(--shadow-light);
}

.dashboard-welcome h2 {
    font-family: 'Baloo 2', cursive;
    font-size: var(--font-size-2xl);
    color: #184e77;
    margin: 0 0 var(--space-3) 0;
}

.dashboard-welcome p {
    font-size: var(--font-size-lg);
    color: #2d6a4f;
    margin: 0;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: var(--space-10);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--c3);
}

.section-header h3 {
    font-family: 'Baloo 2', cursive;
    font-size: var(--font-size-xl);
    color: var(--text);
    margin: 0;
}

.view-all-link {
    color: var(--c6);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: var(--c7);
    text-decoration: underline;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}

/* Exercise Card (compact version for dashboard) */
.dashboard-exercise-card {
    background: #ffffff;
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.dashboard-exercise-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--c5);
}

.dashboard-exercise-card .exercise-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.dashboard-exercise-card .exercise-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.dashboard-exercise-card .exercise-title {
    font-family: 'Baloo 2', cursive;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.dashboard-exercise-card .exercise-category {
    font-size: var(--font-size-sm);
    color: var(--muted);
    margin-bottom: var(--space-3);
}

.dashboard-exercise-card .exercise-description {
    font-size: var(--font-size-base);
    color: var(--text);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.dashboard-exercise-card .exercise-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.dashboard-exercise-card .meta-badge {
    background: var(--c2);
    color: var(--c9);
    padding: var(--space-1) var(--space-2);
    border-radius: calc(var(--radius) * 0.5);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.dashboard-exercise-card .rating-badge {
    background: #ffd700;
    color: #8b6914;
    padding: var(--space-1) var(--space-2);
    border-radius: calc(var(--radius) * 0.5);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* Loading Placeholder */
.loading-placeholder {
    text-align: center;
    padding: var(--space-8);
    color: var(--muted);
    font-size: var(--font-size-lg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-8);
    color: var(--muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-3);
}

.empty-state-title {
    font-family: 'Baloo 2', cursive;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-3);
}

.empty-state-text {
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.empty-state-cta {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    background: var(--c5);
    color: #ffffff;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.empty-state-cta:hover {
    background: var(--c6);
}

/* Tour Guide Overlay */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    pointer-events: none;
}

.tour-overlay.hidden {
    display: none;
}

/* Tour Tooltip */
.tour-content {
    background: #ffffff;
    border-radius: var(--radius);
    padding: var(--space-6);
    max-width: 400px;
    position: fixed;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
    pointer-events: auto;
    border: 3px solid var(--c5);
    z-index: 100000;
}

.tour-content::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Arrow positions */
.tour-content.arrow-bottom::before {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 12px 12px 0 12px;
    border-color: var(--c5) transparent transparent transparent;
}

.tour-content.arrow-top::before {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 12px 12px 12px;
    border-color: transparent transparent var(--c5) transparent;
}

.tour-content.arrow-left::before {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 12px 12px 0;
    border-color: transparent var(--c5) transparent transparent;
}

.tour-content.arrow-right::before {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 12px 0 12px 12px;
    border-color: transparent transparent transparent var(--c5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Highlight effect on sections */
.tour-highlight {
    box-shadow: 0 0 0 4px var(--c5), 0 0 0 8px rgba(82, 182, 154, 0.3);
    border-radius: var(--radius);
    transition: box-shadow 0.3s ease;
    isolation: isolate;
}

.tour-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    padding: var(--space-2);
    transition: color 0.3s ease;
}

.tour-close:hover {
    color: var(--text);
}

.tour-step {
    margin-bottom: var(--space-6);
}

.tour-step h3 {
    font-family: 'Baloo 2', cursive;
    font-size: var(--font-size-xl);
    color: var(--c7);
    margin: 0 0 var(--space-4) 0;
}

.tour-step p {
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text);
    margin: 0 0 var(--space-3) 0;
}

.tour-step-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--space-4);
}

.tour-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.tour-indicator {
    font-size: var(--font-size-sm);
    color: var(--muted);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome {
        padding: var(--space-6) var(--space-4);
    }

    .dashboard-welcome h2 {
        font-size: var(--font-size-xl);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .tour-content {
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    .dashboard-exercise-card {
        padding: var(--space-4);
    }

    .dashboard-exercise-card .exercise-icon {
        font-size: 1.5rem;
    }

    .dashboard-exercise-card .exercise-title {
        font-size: var(--font-size-base);
    }
}
