/* Icon base for Boxicons (ACCA quiz interface) */
.icon-base {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: middle;
}

/* Required field asterisk */
.form-label .req {
    color: var(--bs-danger);
}

/* Rendered rich text (Quill HTML) – display as markup, not raw code */
.rich-text-display {
    line-height: 1.5;
    max-height: 8em;
    overflow: auto;
    word-break: break-word;
}
.rich-text-display ul, .rich-text-display ol { padding-left: 1.25rem; margin-bottom: 0.5rem; }
.rich-text-display p { margin-bottom: 0.5rem; }
.rich-text-display p:last-child { margin-bottom: 0; }

/* Form layout: keep Quill and fields within grid columns */
.quill-wrapper {
    min-width: 0;
    max-width: 100%;
}
.quill-wrapper .quill-editor-target {
    max-width: 100%;
}
.ql-editor {
    min-height: inherit;
}
.ql-container.ql-snow {
    border-radius: 0 0 var(--bs-border-radius);
}
/* Keep multi-column rows (Instructions, AssignQuestions, QuestionGroups) aligned so Quill doesn’t stretch layout */
.instruction-row .row,
.question-row.row,
.group-row .row {
    align-items: flex-start;
}
.instruction-row .col-md-9 .quill-wrapper,
.question-row .col-md-3 .quill-wrapper,
.question-row .col-12 .quill-wrapper,
.group-row .col-md-5 .quill-wrapper,
.group-row .col-12 .quill-wrapper {
    width: 100%;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Admin tables: keep fixed minimum width and allow horizontal scroll */
.table-responsive {
    overflow-x: auto;
}

.table-responsive > .table {
    min-width: 1400px;
    table-layout: fixed;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Question collapse header: align number and statement on same baseline */
.question-collapse-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.5;
    gap: 0.25rem 0.5rem;
}
.question-collapse-header .question-number,
.question-collapse-header > span:first-of-type {
    flex-shrink: 0;
    vertical-align: middle;
}
/* Quiz styles (use core.css --bs-primary) */
.question-card .form-check-input:checked + .form-check-label {
    font-weight: 600;
}

.question-card .table {
    font-size: 0.95em;
}

.question-card code {
    background: rgba(var(--bs-primary-rgb), 0.1);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.question-card var {
    font-style: italic;
}

.feedback-badge.bg-success {
    background-color: var(--bs-success) !important;
}

.feedback-badge.bg-danger {
    background-color: var(--bs-danger) !important;
}

.feedback-badge.bg-warning {
    background-color: var(--bs-warning) !important;
    color: #000;
}

/* Instructions step – rich format (headings, lists, blockquote, etc.) */
.instructions-content {
    min-height: 120px;
    line-height: 1.6;
}

    .instructions-content h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
    .instructions-content h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
    .instructions-content h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }

    .instructions-content ul,
    .instructions-content ol {
        padding-left: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .instructions-content li {
        margin-bottom: 0.5rem;
    }

    .instructions-content blockquote {
        border-left: 4px solid rgba(var(--bs-primary-rgb), 0.5);
        padding-left: 1rem;
        margin: 0.75rem 0;
        color: var(--bs-secondary);
    }

    .instructions-content .ql-code-block-container,
    .instructions-content pre,
    .instructions-content code {
        background: rgba(0, 0, 0, 0.06);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-size: 0.9em;
    }

    .instructions-content pre { padding: 0.75rem; overflow-x: auto; }
    .instructions-content p { margin-bottom: 0.5rem; }

/* Quiz progress bar */
.quiz-progress-bar .progress {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
}

.quiz-progress-bar .quiz-progress-fill {
    background-color: var(--bs-primary);
}

/* Quiz timers */
.quiz-timers {
    font-size: 1rem;
}

.quiz-timer-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0.75rem;
    background: rgba(var(--bs-primary-rgb), 0.08);
    border-radius: 8px;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    min-width: 100px;
}

.quiz-timer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-primary);
    font-weight: 600;
}

.quiz-timer-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #333;
}

@media (min-width: 768px) {
    .quiz-timer-value {
        font-size: 1.4rem;
    }
}

/* ========== ACCA Exam Interface (Chapter-wise tests) ========== */
/* Exam mode: hide site header/footer, full-width */
body.quiz-exam-mode header,
body.quiz-exam-mode footer {
    display: none !important;
}
body.quiz-exam-mode .container {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}
body.quiz-exam-mode main {
    padding-bottom: 0;
}

/* ACCA exam header bar – base layout (theme colors in theme-overrides.css) */
.acca-exam-header {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.acca-exam-header.acca-exam-topbar {
    padding: 1rem 2rem;
    gap: 1.5rem;
}
.acca-topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.acca-logo-link {
    display: inline-flex;
    color: inherit;
    text-decoration: none;
}
.acca-logo-link:hover {
    color: inherit;
    text-decoration: none;
}
.acca-brand-logo {
    height: 36px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}
.acca-exam-header .acca-logo {
    background: #c41e3a;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
}
.acca-exam-header .acca-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 0.02em;
}
.acca-exam-header .acca-test-name {
    color: #d97706;
    font-weight: 500;
    font-size: 0.95rem;
}
.acca-exam-header .acca-exit-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    background: #4a5568;
    border: 1px solid #718096;
}
.acca-exam-header .acca-exit-btn:hover { color: #fff; background: #718096; }
.acca-exam-header .acca-exit-btn {
    cursor: pointer;
    text-decoration: none;
    border: none;
}
.acca-exam-header .acca-exit-btn .icon-base { font-size: 1.25rem; }
.acca-exam-header .acca-exit-btn small { font-size: 0.65rem; text-transform: uppercase; }

/* ACCA exam header – question view */
.acca-exam-header .acca-question-info { font-size: 0.9rem; }
.acca-exam-header .acca-time-remaining { text-align: center; }
.acca-exam-header .acca-time-value { font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.acca-exam-header .acca-progress-wrap { min-width: 140px; }
.acca-exam-header .acca-progress-bar { height: 6px; background: #4a5568; border-radius: 3px; overflow: hidden; }
.acca-exam-header .acca-progress-fill { height: 100%; background: #38a169; border-radius: 3px; transition: width 0.2s; }
.acca-exam-header .acca-progress-details-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #e2e8f0;
    background: transparent;
    border: none;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    cursor: pointer;
}
.acca-exam-header .acca-progress-details-btn:hover { color: #fff; }

/* ACCA footer bar */
.acca-exam-footer {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.acca-exam-footer .acca-footer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: #e2e8f0;
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.acca-exam-footer .acca-footer-btn:hover { color: #fff; }
.acca-exam-footer .acca-footer-btn .icon-base { font-size: 1.5rem; }
.acca-exam-footer .acca-footer-btn.acc-primary { color: #d97706; }
.acca-exam-footer .acca-footer-btn.acc-primary:hover { color: #f59e0b; }
.acca-exam-footer .acca-footer-btn.prev .icon-base { font-size: 1.25rem; }
.acca-exam-footer .acca-footer-btn.next .icon-base { font-size: 1.25rem; }
.acca-exam-footer .acca-footer-label { align-self: center; margin: 0; }

/* ACCA instructions – two-column layout */
.acca-instructions-wrapper {
    background: #fff;
    min-height: 60vh;
    padding: 2rem;
}
.acca-instructions-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}
.acca-instructions-alert .icon-base { color: #d97706; font-size: 1.25rem; flex-shrink: 0; }
.acca-instructions-alert p { margin: 0; font-size: 0.95rem; }
.acca-instructions-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .acca-instructions-columns { grid-template-columns: 1fr; }
}
.acca-instructions-section h5 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.acca-instructions-section ul { padding-left: 1.25rem; margin-bottom: 1rem; }
.acca-instructions-section li { margin-bottom: 0.5rem; }
.acca-instructions-section .acc-example { font-weight: 600; margin-top: 0.25rem; }
.acca-instructions-section .acc-icon-inline { display: inline-flex; align-items: center; gap: 0.25rem; }
.acca-instructions-section .acc-icon-inline .icon-base { font-size: 0.9rem; }

/* ACCA Start Exam page */
.acca-start-exam {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 3rem 2rem;
}
.acca-start-exam p { font-size: 1.1rem; margin-bottom: 1.5rem; color: #374151; }
.acca-start-exam .btn-start-exam {
    background: #c41e3a;
    color: #fff;
    border: 2px solid #a01830;
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
}
.acca-start-exam .btn-start-exam:hover { background: #a01830; color: #fff; border-color: #801428; }

/* ACCA exam step – main content horizontally center-aligned (75% width) */
body.quiz-exam-mode #step-instructions .acca-exam-header,
body.quiz-exam-mode #step-instructions .acca-instructions-wrapper,
body.quiz-exam-mode #step-instructions .acca-exam-footer,
body.quiz-exam-mode #step-questions .acca-exam-header,
body.quiz-exam-mode #step-questions .acca-question-content,
body.quiz-exam-mode #step-questions .acca-exam-footer,
body.quiz-exam-mode #step-start-exam .acca-exam-header,
body.quiz-exam-mode #step-start-exam .acca-start-exam,
body.quiz-exam-mode #step-start-exam .acca-exam-footer,
body.quiz-exam-mode #step-result .acca-exam-header,
body.quiz-exam-mode #step-result .acca-result-wrapper {
    margin-left: auto;
    margin-right: auto;
    max-width: 75%;
    width: 100%;
}

/* ACCA question content area – center aligned */
.acca-question-content {
    background: #faf9f7;
    min-height: 50vh;
    padding: 2rem 2.5rem;
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
}
.acca-question-content .acc-question-body {
    max-width: 720px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.acca-question-content .question-card .question-statement { line-height: 1.6; }
.acca-question-content .question-card .question-statement p { margin-bottom: 0.5rem; }
.acca-question-content .question-card .question-statement p:last-child { margin-bottom: 0; }
.acca-question-content .question-card .question-statement {
    line-height: 1.6;
    font-size: 1.1rem;
}
.acca-question-content .question-card .question-statement p { margin-bottom: 0.5rem; }
.acca-question-content .question-card .question-statement p:last-child { margin-bottom: 0; }
.acca-question-content .question-card .question-statement ol,
.acca-question-content .question-card .question-statement ul {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}
.acca-question-content .form-check {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    transition: border-color 0.2s, background-color 0.2s;
}
.acca-question-content .form-check:hover {
    border-color: rgba(0, 0, 0, 0.25);
}

/* ACCA Test Progress Details panel */
.acca-progress-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 480px;
}
.acca-progress-panel .acc-panel-legend {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.acca-progress-panel .acc-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.acca-progress-panel .acc-legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.acca-progress-panel .acc-legend-dot.complete { background: #d97706; }
.acca-progress-panel .acc-legend-dot.incomplete { background: transparent; border: 2px solid #718096; }
.acca-progress-panel .acc-legend-dot.flagged { background: #333; }
.acca-progress-panel .acc-panel-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
}
.acca-progress-panel .acc-panel-cell {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #c41e3a;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.acca-progress-panel .acc-panel-cell:hover { background: #fef2f2; }
.acca-progress-panel .acc-panel-cell.current { border-width: 3px; font-weight: 700; }
.acca-progress-panel .acc-panel-cell.complete { background: #d97706; color: #fff; border-color: #d97706; }
.acca-progress-panel .acc-panel-cell.incomplete { border-color: #718096; color: #333; }
.acca-progress-panel .acc-panel-cell.flagged { border-color: #333; }
.acca-progress-panel .acc-panel-cell .acc-cell-flag { font-size: 1.25rem; display: inline-block; line-height: 1; }

/* ACCA Result page – consistent with instructions/start-exam spacing */
.acca-result-wrapper {
    padding: 2rem 2.5rem;
    max-width: 100%;
}
.acca-result-wrapper .acc-result-title { font-size: 2rem; font-weight: 700; margin-bottom: 1.5rem; color: #1f2937; }
.acca-result-wrapper .acc-result-detail { margin-bottom: 0.75rem; }
.acca-result-wrapper .acc-result-box {
    background: #d97706;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 0 1.5rem 0;
}
.acca-result-wrapper .acc-result-box.success { background: #059669; }
.acca-result-wrapper .acc-result-detail strong { color: #d97706; }
.acca-result-wrapper .mt-4.d-flex { margin-top: 1.5rem !important; }

/* ===== Student portal consistency contract (buttons + quiz headers) ===== */
.student-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.student-action-row .student-action-btn {
    min-width: 220px;
    font-weight: 600;
}

.acca-exam-header.acca-exam-topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.acca-exam-topbar .acca-topbar-left,
.acca-exam-topbar .acca-topbar-center,
.acca-exam-topbar .acca-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.acca-exam-topbar .acca-topbar-center {
    flex: 1 1 300px;
}

.acca-exam-topbar .acca-topbar-right {
    margin-left: auto;
    justify-content: flex-end;
}

.acca-exam-topbar .acca-question-info,
.acca-exam-topbar .acca-time-remaining {
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

.acca-exam-topbar .acca-question-info .acca-meta-label {
    font-weight: 700;
}

.acca-exam-topbar .acca-time-remaining .small,
.acca-exam-topbar .acca-progress-wrap .small {
    font-size: 0.78rem;
    font-weight: 600;
}

.acca-exam-topbar .acca-progress-wrap {
    min-width: 220px;
}

.acca-exam-topbar .acca-progress-details-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.4rem;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
}

.acca-exam-topbar .acc-pause-btn,
.acca-exam-topbar .acc-resume-btn {
    min-width: 90px;
    justify-content: center;
}

.acca-exam-footer {
    justify-content: center;
    gap: 0.75rem;
}

.acca-exam-footer .acca-footer-btn {
    flex-direction: row;
    gap: 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.45rem;
    min-width: 120px;
    justify-content: center;
}

.acca-exam-footer .acca-footer-label {
    order: 6;
    min-width: 160px;
    text-align: center;
    font-weight: 600;
}

#quiz-wizard,
#mock-test-wizard {
    width: 100%;
}

@media (max-width: 1200px) {
    body.quiz-exam-mode #quiz-wizard #step-instructions .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-instructions .acca-instructions-wrapper,
    body.quiz-exam-mode #quiz-wizard #step-instructions .acca-exam-footer,
    body.quiz-exam-mode #quiz-wizard #step-questions .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-questions .acca-question-content,
    body.quiz-exam-mode #quiz-wizard #step-questions .acca-exam-footer,
    body.quiz-exam-mode #quiz-wizard #step-start-exam .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-start-exam .acca-start-exam,
    body.quiz-exam-mode #quiz-wizard #step-start-exam .acca-exam-footer,
    body.quiz-exam-mode #quiz-wizard #step-result .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-result .acca-result-wrapper,
    body.quiz-exam-mode #mock-test-wizard #step-instructions .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-instructions .acca-instructions-wrapper,
    body.quiz-exam-mode #mock-test-wizard #step-instructions .acca-exam-footer,
    body.quiz-exam-mode #mock-test-wizard #step-questions .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-questions .acca-question-content,
    body.quiz-exam-mode #mock-test-wizard #step-questions .acca-exam-footer,
    body.quiz-exam-mode #mock-test-wizard #step-start-exam .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-start-exam .acca-start-exam,
    body.quiz-exam-mode #mock-test-wizard #step-start-exam .acca-exam-footer,
    body.quiz-exam-mode #mock-test-wizard #step-result .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-result .acca-result-wrapper {
        max-width: 90%;
    }
}

@media (max-width: 992px) {
    body.quiz-exam-mode #quiz-wizard #step-instructions .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-instructions .acca-instructions-wrapper,
    body.quiz-exam-mode #quiz-wizard #step-instructions .acca-exam-footer,
    body.quiz-exam-mode #quiz-wizard #step-questions .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-questions .acca-question-content,
    body.quiz-exam-mode #quiz-wizard #step-questions .acca-exam-footer,
    body.quiz-exam-mode #quiz-wizard #step-start-exam .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-start-exam .acca-start-exam,
    body.quiz-exam-mode #quiz-wizard #step-start-exam .acca-exam-footer,
    body.quiz-exam-mode #quiz-wizard #step-result .acca-exam-header,
    body.quiz-exam-mode #quiz-wizard #step-result .acca-result-wrapper,
    body.quiz-exam-mode #mock-test-wizard #step-instructions .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-instructions .acca-instructions-wrapper,
    body.quiz-exam-mode #mock-test-wizard #step-instructions .acca-exam-footer,
    body.quiz-exam-mode #mock-test-wizard #step-questions .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-questions .acca-question-content,
    body.quiz-exam-mode #mock-test-wizard #step-questions .acca-exam-footer,
    body.quiz-exam-mode #mock-test-wizard #step-start-exam .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-start-exam .acca-start-exam,
    body.quiz-exam-mode #mock-test-wizard #step-start-exam .acca-exam-footer,
    body.quiz-exam-mode #mock-test-wizard #step-result .acca-exam-header,
    body.quiz-exam-mode #mock-test-wizard #step-result .acca-result-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    #quiz-wizard .acca-exam-header.acca-exam-topbar,
    #mock-test-wizard .acca-exam-header.acca-exam-topbar {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
        flex-direction: column;
        align-items: stretch;
    }

    #quiz-wizard .acca-topbar-left,
    #quiz-wizard .acca-topbar-center,
    #quiz-wizard .acca-topbar-right,
    #mock-test-wizard .acca-topbar-left,
    #mock-test-wizard .acca-topbar-center,
    #mock-test-wizard .acca-topbar-right {
        width: 100%;
        gap: 0.75rem;
    }

    #quiz-wizard .acca-topbar-right,
    #mock-test-wizard .acca-topbar-right {
        justify-content: flex-start;
    }

    #quiz-wizard #step-questions .acca-question-info,
    #quiz-wizard #step-questions .acca-time-remaining,
    #quiz-wizard #step-questions .acca-progress-wrap,
    #mock-test-wizard #step-questions .acca-question-info,
    #mock-test-wizard #step-questions .acca-time-remaining,
    #mock-test-wizard #step-questions .acca-progress-wrap {
        width: 100%;
    }

    #quiz-wizard #step-questions .acca-time-remaining,
    #mock-test-wizard #step-questions .acca-time-remaining {
        text-align: left;
    }

    #quiz-wizard #step-questions .acca-progress-details-btn,
    #mock-test-wizard #step-questions .acca-progress-details-btn {
        width: 100%;
        justify-content: space-between;
    }

    #quiz-wizard .acca-instructions-wrapper,
    #quiz-wizard .acca-question-content,
    #quiz-wizard .acca-start-exam,
    #quiz-wizard .acca-result-wrapper,
    #mock-test-wizard .acca-instructions-wrapper,
    #mock-test-wizard .acca-question-content,
    #mock-test-wizard .acca-start-exam,
    #mock-test-wizard .acca-result-wrapper {
        padding: 1rem;
    }

    #quiz-wizard .acca-question-content .question-card .question-statement,
    #mock-test-wizard .acca-question-content .question-card .question-statement {
        font-size: 1rem;
    }

    #quiz-wizard .acca-exam-footer,
    #mock-test-wizard .acca-exam-footer {
        padding: 0.75rem;
        gap: 0.5rem;
        justify-content: flex-start;
    }

    #quiz-wizard .acca-exam-footer .acca-footer-label,
    #mock-test-wizard .acca-exam-footer .acca-footer-label {
        width: 100%;
        order: 10;
        text-align: center;
    }

    #quiz-wizard .acca-exam-footer .acca-footer-btn,
    #mock-test-wizard .acca-exam-footer .acca-footer-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 135px;
        padding: 0.5rem 0.6rem;
    }

    #quiz-wizard .acca-progress-panel .acc-panel-legend,
    #mock-test-wizard .acca-progress-panel .acc-panel-legend {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    #quiz-wizard .acca-progress-panel .acc-panel-grid,
    #mock-test-wizard .acca-progress-panel .acc-panel-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    #quiz-wizard .acca-progress-panel .acc-panel-cell,
    #mock-test-wizard .acca-progress-panel .acc-panel-cell {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    #quiz-wizard .acca-start-exam .btn-start-exam,
    #mock-test-wizard .acca-start-exam .btn-start-exam {
        width: 100%;
        max-width: 320px;
    }

    .student-action-row .student-action-btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    #quiz-wizard .acca-brand-logo,
    #mock-test-wizard .acca-brand-logo {
        height: 30px;
    }

    #quiz-wizard .acca-exam-header .acca-title,
    #mock-test-wizard .acca-exam-header .acca-title {
        font-size: 1rem;
    }

    #quiz-wizard .acca-exam-footer .acca-footer-btn,
    #mock-test-wizard .acca-exam-footer .acca-footer-btn {
        flex: 1 1 100%;
    }

    #progressDetailsModal .modal-dialog,
    #exitConfirmModal .modal-dialog {
        margin: 0.5rem;
    }
}
