/* --- Root Variables for 2026 Pro Suite --- */
:root {
    --at-primary: #003366;
    --at-secondary: #00843D;
    --at-values-gold: #FFCD00;
    --at-values-light: #fff9c4;
    --at-error: #ef4444;
    --at-success: #22c55e;
    --at-review-blue: #007bff;
    --at-bg-light: #f0f2f5;
    --at-white: #ffffff;
    --at-text-main: #333333;
    --at-text-muted: #666666;
    --at-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* --- Base Container --- */
.at-scope {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--at-text-main);
}

.at-card {
    display: none;
    background: var(--at-white);
    border-radius: 12px;
    box-shadow: var(--at-shadow);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    animation: atFadeIn 0.3s ease-out;
}

.at-card.active { display: block; }

@keyframes atFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Intro View --- */
.at-intro-content {
    padding: 60px 20px;
    text-align: center;
}

.at-intro-content h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--at-primary);
    margin-bottom: 15px;
}

.at-req-box {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.at-req-box span {
    background: var(--at-bg-light);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #ddd;
}

/* --- Navigation Dots (Responsive) --- */
#at-nav-dots {
    display: flex;
    gap: 6px;
    padding: 20px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    justify-content: flex-start;
    border-bottom: 1px solid #f0f0f0;
}

/* New Desktop Grid Addition */
@media (min-width: 992px) {
    #at-nav-dots {
        display: grid;
        grid-template-columns: repeat(10, 1fr); /* 10 dots per row = 2 rows for 20 */
        overflow-x: visible;
        max-width: 900px;
        margin: 0 auto;
        gap: 12px;
        padding: 30px;
    }
}

#at-nav-dots::-webkit-scrollbar { display: none; }

.at-dot {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    background: white;
    border: 2px solid #ddd;
    transition: all 0.2s ease;
}

/* Adjusting dot size for the desktop grid */
@media (min-width: 992px) {
    .at-dot {
        flex: none;
        width: 100%;
        height: 48px;
        font-size: 15px;
    }
}

.at-dot.active { border-color: var(--at-secondary); color: var(--at-secondary); background: #f0fff4; }
.at-dot.filled { background: #556677; color: white; border-color: #556677; }
.at-dot.is-val { border-color: var(--at-values-gold); }
.at-dot.flagged { background: var(--at-review-blue) !important; color: white; border-color: var(--at-review-blue); }

/* --- Top Bar & Question --- */
.at-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

#at-timer { font-size: 1.2rem; font-weight: 800; }

.at-question-card { padding: 0 20px 20px; }

.at-badge {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    margin: 20px 0;
    border: 1px solid transparent;
}

.at-badge-normal {
    background: #006400 !important;
    border-color:#006400;
}

.at-badge-value {
    background: #fff9c4 !important;
    color: #000 !important;
    border-color: #fbc02d !important;
}

/* --- Options Labels --- */
.at-opt {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.at-opt:hover { border-color: #bbb; background: #fafafa; }
.at-opt.selected { border-color: var(--at-review-blue); background: #f0f7ff; }

.at-opt input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

/* --- Footer Nav & Grid --- */
.at-footer-nav {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 12px;
    padding: 20px;
    background: #fcfcfc;
    border-top: 1px solid #eee;
}
.at-btn-outline {
    background: none;
    border: 1px solid var(--at-review-blue);
    color: var(--at-review-blue);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .at-footer-nav {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "prev next" "submit submit";
    }
    #at-prev-btn { grid-area: prev; }
    #at-next-btn { grid-area: next; }
    #at-submit-btn { grid-area: submit; padding: 18px !important; }
}

.at-btn {
    padding: 14px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.at-btn:active { transform: scale(0.98); }
.at-btn-blue { background: var(--at-primary); color: white; }
.at-btn-green { background: var(--at-success); color: white; }
.at-btn-grey { background: #6c757d; color: white; }
.at-btn-main { background: var(--at-primary); color: white; font-size: 1.1rem; }

/* --- Results Page --- */
.at-result-header {
    padding: 50px 20px;
    text-align: center;
    border-bottom: 8px solid;
}

.at-result-header.pass { background: #f0fff4; border-color: var(--at-success); color: #166534; }
.at-result-header.fail { background: #fff5f5; border-color: var(--at-error); color: #991b1b; }

.at-icon-big { font-size: 60px; margin-bottom: 10px; }

.at-result-body { padding: 30px; }

.at-score-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.at-bar-row { margin-bottom: 20px; }
.at-bar-labels { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.at-bar-bg { background: #eee; height: 10px; border-radius: 10px; overflow: hidden; }
.at-bar-fill { height: 100%; transition: width 1s ease-in-out; }

/* Review Cards */
.at-review-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid #eee;
}

.at-review-card.val-border { border-left: 5px solid var(--at-values-gold); }

.at-review-opt {
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    font-size: 14px;
}

.at-expl {
    margin-top: 15px;
    padding: 12px;
    background: var(--at-bg-light);
    border-radius: 6px;
    font-size: 14px;
    color: #444;
}

/* --- Modal Overlay --- */
.at-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.at-modal-overlay.active { display: flex; }

.at-modal-content {
    background: white;
    padding: 35px;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

#at-modal-icon { font-size: 40px; margin-bottom: 15px; }

.at-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.at-modal-actions button { flex: 1; }

/* --- New Navigation Buttons CSS --- */
.at-test-nav-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.at-test-nav-footer .at-btn {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    padding: 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.at-test-nav-footer .at-btn-grey {
    background: var(--at-bg-light);
    color: var(--at-text-main);
    border: 1px solid #ddd;
}

.at-test-nav-footer .at-btn-blue {
    background: var(--at-primary);
    color: var(--at-white) !important;
}

.at-test-nav-footer .at-btn-blue:hover {
    filter: brightness(1.2);
    transform: translateX(3px);
}

@media (max-width: 480px) {
    .at-test-nav-footer { grid-template-columns: 1fr; }
    .at-test-nav-footer .at-btn-blue { order: -1; }
    .at-question-card { padding: 0 10px 20px; }
    #at-nav-dots {padding: 15px; }
    .at-opt { padding: 10px; font-size: 18px; }
    .at-btn-outline { padding: 8px 12px; min-width: 20px; }
}