/* Progress Header and Modal Styles */

/* Global contrast: page background vs module canvas */
body {
    background: linear-gradient(180deg, #2a5a6d 0%, #21495a 100%);
}

.container {
    border: 2px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* Page Header */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #133746;
    border-bottom: 2px solid #0f2c37;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left,
.header-right {
    display: flex;
    gap: 10px;
}

/* Progress Button */
.progress-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #0d7c13;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.progress-btn:hover {
    background-color: #0a6710;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 124, 19, 0.2);
}

.progress-btn:active {
    transform: translateY(0);
}

.progress-btn svg {
    width: 18px;
    height: 18px;
}

/* Exit Button */
.exit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exit-btn:hover {
    color: #820000;
    border-color: #820000;
    background-color: #fff5f5;
}

.exit-btn svg {
    width: 20px;
    height: 20px;
}

/* Progress Modal */
.progress-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.progress-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.progress-modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    padding: 5px;
}

.modal-close:hover {
    color: #000;
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.progress-modal-content h2 {
    font-family: 'Roboto Slab', serif;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-right: 40px;
}

/* Progress Sections */
.progress-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.progress-section h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Steps Container */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.step-item.clickable {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.step-item.clickable:hover {
    background-color: #eef7ff;
    transform: translateX(2px);
}

.step-item.locked {
    opacity: 0.65;
}

.step-link {
    display: flex;
    align-items: center;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.step-item.completed {
    background-color: #f0f8f5;
    border-left-color: #0d7c13;
    color: #333;
    font-weight: 500;
}

.step-item .step-icon {
    margin-right: 12px;
    font-size: 16px;
    min-width: 20px;
}

.step-item.completed .step-icon {
    color: #0d7c13;
}

/* Practice Container */
.practice-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.practice-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.practice-item.clickable {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.practice-item.clickable:hover {
    background-color: #eef7ff;
    transform: translateX(2px);
}

.practice-item.locked {
    opacity: 0.65;
}

.practice-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.practice-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.practice-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.practice-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: #fff8f0;
    color: #d67a3e;
}

.practice-status.completed {
    background-color: #f0f8f5;
    color: #0d7c13;
}

.practice-details {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.practice-details span {
    display: block;
}

/* Overall Status */
.overall-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.status-card {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.status-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.status-value {
    font-family: 'Roboto Slab', serif;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.status-value.highlight {
    color: #0d7c13;
}

/* Exit Confirmation Modal */
.exit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

.exit-modal.active {
    display: flex;
}

.exit-modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.3s ease-out;
}

.exit-modal-content h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.exit-modal-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.exit-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.exit-modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.exit-confirm {
    background-color: #820000;
    color: white;
}

.exit-confirm:hover {
    background-color: #600000;
    transform: translateY(-2px);
}

.exit-cancel {
    background-color: #e0e0e0;
    color: #333;
}

.exit-cancel:hover {
    background-color: #d0d0d0;
}

/* Adjust container for fixed header */
body {
    padding-top: 60px;
}

/* Hide header on assessment page */
.page-header.hidden,
.exit-btn.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        height: 50px;
        padding: 0 15px;
    }

    .progress-btn span {
        display: none;
    }

    .progress-btn {
        padding: 8px 12px;
        width: 40px;
        justify-content: center;
    }

    .progress-modal-content {
        padding: 20px;
        max-height: 90vh;
    }

    .overall-status {
        grid-template-columns: 1fr;
    }

    .progress-modal-content h2 {
        font-size: 24px;
    }

    body {
        padding-top: 50px;
    }
}
