/* Parent Dashboard Styles */

/* Set page background to light gray only when parent dashboard is present */
body.parent-dashboard-page {
    background-color: #f1f4f8 !important;
}

/* Header Styles */
.parent-dashboard-header {
    background-color: #ffffff;
    padding: 15px 0;
    width: 100%;
}

.parent-dashboard-header .header-content {
    max-width: 650px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.parent-dashboard-header .header-logo img {
    height: 1.5rem;
    width: auto;
}

.parent-dashboard-header .header-updated {
    color: #999;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.parent-dashboard-header .header-updated span:first-child {
    font-size: 14px;
}

/* General Styles */
.parent-dashboard {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    color: #333;
    box-sizing: border-box;
}

/* Parent Badge */
.parent-dashboard .parent-badge {
    display: inline-block;
    background: #6366f1;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 auto 16px;
    text-align: center;
}

/* Student Name Styling */
.parent-dashboard .student-name {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
}

.parent-dashboard .student-name .name-text {
    color: #3167ff;
}

/* Login Link Styling */
.parent-dashboard .login-link {
    color: #3167ff;
    text-decoration: underline;
}

.parent-dashboard .login-link:hover {
    color: #2557e6;
}

.parent-dashboard h3 {
    margin-bottom: 20px;
}

.parent-dashboard .error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Progress Bars */
.parent-dashboard .progress-bar {
    background-color: #ecf0f1;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.parent-dashboard .progress-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease-in-out;
}

.parent-dashboard #course-progress-bar-fill {
    background-color: #3167ff;
}

.parent-dashboard #driving-progress-bar-fill {
    background-color: #27ae60;
}

.parent-dashboard .progress-bar {
    background: #e9ecef;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.parent-dashboard .progress-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Dashboard Sections */
.parent-dashboard .dashboard-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    margin-left: -5px;
    margin-right: -5px;
}

/* View Details Toggle */
.parent-dashboard .view-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    background: transparent;
    color: #3167ff;
    border: 1px solid #3167ff;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.parent-dashboard .view-details-toggle:hover {
    background: #3167ff;
    color: white;
}

.parent-dashboard .view-details-toggle .toggle-icon {
    transition: transform 0.3s ease;
}

.parent-dashboard .view-details-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* Course Details Content */
.parent-dashboard .course-details-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.parent-dashboard .course-details-content.expanded {
    max-height: none;
    margin-top: 20px;
    overflow: visible;
}

/* Course Steps List */
.parent-dashboard .course-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

/* Custom scrollbar for steps list */
.parent-dashboard .course-steps-list::-webkit-scrollbar {
    width: 8px;
}

.parent-dashboard .course-steps-list::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.parent-dashboard .course-steps-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.parent-dashboard .course-steps-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.parent-dashboard .step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 0.95rem;
    background: white;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    position: relative;
}

.parent-dashboard .step-item:last-child {
    margin-bottom: 0;
}

.parent-dashboard .step-item:hover {
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.parent-dashboard .step-item.completed {
    color: #212529;
    background: #e7f5e7;
    border-color: #c3e6c3;
}

.parent-dashboard .step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.parent-dashboard .step-name {
    flex: 1;
    font-weight: 500;
}

/* Step Info Icon and Popover */
.parent-dashboard .step-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.parent-dashboard .step-info-icon:hover {
    background: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
}

.parent-dashboard .step-info-icon svg {
    width: 16px;
    height: 16px;
}

/* Tooltip/Popover */
.parent-dashboard .step-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
    padding: 12px 16px;
    background: #333;
    color: white;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 8px;
    white-space: normal;
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.parent-dashboard .step-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
}

/* Show tooltip on hover (desktop) */
.parent-dashboard .step-info-icon:hover .step-tooltip,
.parent-dashboard .step-info-icon:focus .step-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Active state for mobile */
.parent-dashboard .step-info-icon.active .step-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .parent-dashboard .course-steps-list {
        max-height: 400px;
        padding: 12px;
    }
    
    .parent-dashboard .step-item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .parent-dashboard .step-tooltip {
        position: fixed;
        left: 50%;
        right: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        width: 90%;
        max-width: 320px;
        z-index: 9999;
    }
    
    .parent-dashboard .step-tooltip::after {
        display: none;
    }
    
    /* Mobile backdrop */
    .parent-dashboard .step-info-icon.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }
}

@media (max-width: 480px) {
    .parent-dashboard .step-name {
        font-size: 0.875rem;
    }
    
    .parent-dashboard .step-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .parent-dashboard .step-info-icon {
        width: 20px;
        height: 20px;
    }
}

.parent-dashboard .dashboard-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #1a1a1a;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parent-dashboard .dashboard-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 16px 0 20px;
    color: #1a1a1a;
}

.parent-dashboard .dashboard-info {
    margin-bottom: 40px;
    padding: 0;
    background: transparent;
    border: none;
}

.parent-dashboard .dashboard-info p {
    margin: 0 0 12px 0;
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
}

.parent-dashboard .dashboard-info p:first-child {
    font-weight: 400;
    color: #555;
    margin-bottom: 14px;
    font-size: 1rem;
}

.parent-dashboard .dashboard-info p:last-child {
    margin-bottom: 0;
}

.parent-dashboard .dashboard-info a {
    color: #3167ff;
    text-decoration: underline;
}

/* Icon List */
.parent-dashboard .icon-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.parent-dashboard .icon-list li {
    position: relative;
    padding: 12px 0 12px 36px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
}

.parent-dashboard .icon-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.parent-dashboard .icon-list li:before {
    content: '✓';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #3167ff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.parent-dashboard .action-items-section .icon-list li:before {
    content: '→';
    background: #6366f1;
}

.parent-dashboard .achievements-section .icon-list li:before {
    content: '★';
    background: #f39c12;
}

/* Dashboard Link */
.parent-dashboard .dashboard-link-container {
    margin-top: 16px;
    margin-bottom: 20px;
}

.parent-dashboard #dashboard-link {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
    color: #495057;
    font-family: 'Courier New', monospace;
    box-sizing: border-box;
}

.parent-dashboard #dashboard-link:focus {
    outline: none;
    background: white;
    border-color: #80bdff;
}

/* Link Action Buttons */
.parent-dashboard .link-action-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.parent-dashboard .button-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #3167ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 140px;
    justify-content: center;
}

.parent-dashboard .button-primary svg {
    flex-shrink: 0;
}

.parent-dashboard .button-primary:hover {
    background: #2557e6;
}

.parent-dashboard .button-primary:active {
    background: #1a47d6;
}

.parent-dashboard .button-separator {
    color: #6c757d;
    font-size: 1rem;
}

.parent-dashboard .note {
    font-size: 0.9rem;
    color: #444;
    margin-top: 16px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.parent-dashboard .note-icon {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
}

/* Log Hours Button */
.parent-dashboard #log-hours-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 24px;
    background: #3167ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.parent-dashboard #log-hours-btn svg {
    flex-shrink: 0;
}

.parent-dashboard #log-hours-btn:hover {
    background: #2557e6;
}

/* Set section backgrounds to white */
.parent-dashboard .course-progress-section,
.parent-dashboard .driving-hours-section,
.parent-dashboard .action-items-section,
.parent-dashboard .achievements-section,
.parent-dashboard .link-section {
    background: white;
}

/* Remove emoji icons from section headings */
.parent-dashboard .course-progress-section h3::before,
.parent-dashboard .driving-hours-section h3::before,
.parent-dashboard .action-items-section h3::before,
.parent-dashboard .achievements-section h3::before,
.parent-dashboard .link-section h3::before {
    content: none;
}

/* Responsive improvements for parent dashboard */
@media (max-width: 768px) {
    .parent-dashboard {
        padding: 20px;
    }
    
    .parent-dashboard .parent-badge {
        display: block;
        margin: 0 auto 12px;
        text-align: center;
    }
    
    .parent-dashboard .student-name {
        font-size: 1.5rem;
    }
    
    .parent-dashboard .dashboard-section {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .parent-dashboard .dashboard-section h2 {
        font-size: 1.5rem;
    }
    
    .parent-dashboard .dashboard-section h3 {
        font-size: 1rem;
    }
    
    .parent-dashboard .link-action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .parent-dashboard .button-primary {
        width: 100%;
    }
    
    .parent-dashboard .button-separator {
        display: none;
    }
    
    .parent-dashboard #log-hours-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .parent-dashboard {
        padding: 16px;
    }
    
    .parent-dashboard .dashboard-section {
        padding: 16px;
        border-radius: 8px;
    }
    
    .parent-dashboard .dashboard-section h2 {
        font-size: 1.25rem;
    }
    
    .parent-dashboard .icon-list li {
        padding-left: 32px;
        font-size: 0.9rem;
    }
    
    .parent-dashboard .icon-list li:before {
        width: 18px;
        height: 18px;
        font-size: 11px;
        left: 8px;
    }
}

/* The step-modal styles are inherited from course-styles.css */

/* Lesson Progress Styles (from lesson-progress.css) */
.parent-dashboard .icon-list li .lesson-progress {
    font-weight: 600;
    color: #1976d2;
    margin-left: 4px;
}

.parent-dashboard .course-steps-list .step-item .lesson-progress {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e3f2fd;
    color: #1976d2;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 12px;
    line-height: 1.2;
    vertical-align: middle;
    margin-left: auto; /* Push to the right, before the info icon */
}

/* ----- Locked overlay for Driving Hours (requires .locked-overlay) ----- */
.driving-hours-section.locked-overlay {
    position: relative;
    pointer-events: none;          /* disable interaction with underlying content */
}

.driving-hours-section.locked-overlay::before {
    content: "This section is locked until the step ‘Get Your Learner License at the DPS’ is completed.";
    position: absolute;
    inset: 0;                      /* top:0; right:0; bottom:0; left:0; */
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: inherit;        /* keep same rounded corners */
    z-index: 10;
    pointer-events: all;           /* allow tooltip or future interaction with the banner itself */
}