body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f2f2f2;
    border: 1px solid #F6851F;
}

.test-wrapper {
    display: flex;
    /* height: 100vh; */
    height: calc(100vh - 50px);
}

.left-section {
    width: 75%;
    padding: 0;
    background-color: #fff;
    border-right: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    position: relative;
}

.right-section {
    width: 25%;
    padding: 0;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ccc;
}

.top-bar {
    background-color: #343a40;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 16px;
}

.section-box {
    border-bottom: 1px solid #ccc;
    padding: 15px 20px;
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.test-time-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.question-text {
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: bold;
    position: relative;
}

.candidate-id-bg {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 80px;
    color: rgba(230, 230, 230, 0.4);
    z-index: 0;
    user-select: none;
    transform: rotate(-45deg);
    white-space: nowrap;
}

.question-options {
    position: relative;
    z-index: 1;
}

.question-options .form-check {
    margin-bottom: 20px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #fafafa;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #ccc;
}

.action-buttons .btn {
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
}

.left-group,
.right-group {
    display: flex;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.status-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
}

.status-row .badge {
    margin: 0;
    padding: 6px 12px;
    font-size: 14px;
}

.status-row .box {
    min-width: 35px;
    background: #e0e0e0;
    color: #000;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    text-align: center;
}

.palette-box {
    padding: 15px 20px;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    flex-grow: 1;
    overflow-y: auto;
}

.palette-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.palette-buttons button {
    width: 40px;
    height: 40px;
    font-weight: bold;
}

.submit-button {
    text-align: center;
    /* padding: 20px;
    border-top: 1px solid #ccc; */
}

@media (max-width: 768px) {
    .test-wrapper {
        flex-direction: column;
        height: auto;
    }

    .left-section,
    .right-section {
        width: 100%;
        max-height: none;
        height: auto;
        overflow: visible;
    }

    .right-section {
        border-left: none;
        border-top: 1px solid #ccc;
    }

    .question-body,
    .palette-box {
        max-height: 300px;
        overflow-y: auto;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

.left-section,
.right-section {
    overflow-y: auto;
    max-height: calc(100vh - 50px);
    /* Adjust for top-bar height */
}

/* .right-section {
    overflow-y: auto;
} */

.candidate-id-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.08;
    overflow: hidden;
}

.watermark-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    font-size: 30px;
    color: black;
    transform: rotate(-30deg);
    gap: 20px;
    padding: 20px;
}

.watermark-grid span {
    white-space: nowrap;
    flex: 0 0 auto;
}

.btn-answered {
    background-color: #28a745;
    color: white;
}

.btn-review {
    background-color: #ffc107;
    color: black;
}

.btn-answered-review {
    background-color: #17a2b8;
    color: white;
}

.btn-not-visited {
    background-color: #e0e0e0;
    color: #000;
}

.btn-active {
    border: 2px solid #F6851F !important;
    box-shadow: 0 0 5px #F6851F;
}

.btn-not-answered {
    background-color: #dc3545;
    /* Bootstrap danger red */
    color: white;
}

/* Scientific Calculator */
.sci-calculator-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: #fff;
    border: 2px solid #F6851F;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    border-radius: 12px;
}

.sci-calculator-content {
    padding: 20px;
}

.sci-calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.sci-close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #ff0000;
}

#calc-display {
    width: 100%;
    height: 50px;
    font-size: 24px;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ccc;
    text-align: right;
    border-radius: 5px;
}

.sci-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.sci-buttons button {
    height: 45px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    background-color: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.sci-buttons button:hover {
    background-color: #dcdcdc;
}

/* Tag badges */
.question-type-mcq {
    color: white;
    background-color: #007bff;
    padding: 2px 8px;
    border-radius: 5px;
}

.question-type-nat {
    color: white;
    background-color: #fd7e14;
    padding: 2px 8px;
    border-radius: 5px;
}

.option-img {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* ✅ Responsive adjustments */
@media screen and (max-width: 576px) {
    .sci-calculator-modal {
        width: 95%;
        top: 5%;
        border-radius: 10px;
    }

    #calc-display {
        height: 45px;
        font-size: 20px;
    }

    .sci-buttons button {
        height: 40px;
        font-size: 14px;
    }

    .sci-calculator-header {
        font-size: 16px;
    }

    .sci-close-btn {
        font-size: 20px;
    }
}

/* Applies to both vertical and horizontal */
::-webkit-scrollbar {
    width: 6px;
    /* Vertical scrollbar */
    height: 6px;
    /* Horizontal scrollbar */
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background-color: #f6851f;
    /* border-radius: 4px; */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #203a43;
    border: 1px solid #f6851f;
}











/* ============================
   CSS for the Popup
   ============================ */
.custom-popup-overlay {
    z-index: 1105;
    /* Higher than Bootstrap modal */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-popup-box {
    background-color: #fff;
    width: 90%;
    max-width: 480px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-weight: bold;
    color: white;
}

.custom-popup-body {
    max-height: 300px;
    /* Adjust this value based on your design */
    overflow-y: auto;
    /* Enables vertical scrolling */
    padding: 20px;
    font-size: 14px;
    color: #333;
    background-color: #f8f9fa;
    text-align: left;
    word-wrap: break-word;
}

.custom-popup-footer {
    padding: 12px 16px;
    background-color: #f1f1f1;
}

.custom-popup-close {
    background: transparent;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

/* Dynamic header colors based on type */
.custom-popup-header.success {
    background-color: #28a745;
}

/* Green */
.custom-popup-header.error {
    background-color: #dc3545;
}

/* Red */
.custom-popup-header.info {
    background-color: #007bff;
}

/* Blue */
.custom-popup-header.warning {
    background-color: #ffc107;
}

/* Popup Blink */
@keyframes popupBlink {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.02);
    }

    50% {
        transform: scale(0.98);
    }

    75% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

.popup-blink {
    animation: popupBlink 0.3s ease;
}


/* ============================
   Make Disabled Inputs Look Brighter & Readable while reviewing attempted test
   ============================ */


.question-options input[disabled] {
    opacity: 1 !important;
    /* Make input visible */
    cursor: default;
}

.question-options label {
    font-size: 1rem;
    opacity: 1;
}

.question-options .form-check-label.text-danger {
    color: #dc3545 !important;
    font-weight: 500;
}

.question-options .form-check-label.text-success {
    color: #28a745 !important;
    font-weight: 600;
}

.question-options .form-check-label {
    font-weight: 500;
}

.form-check-input:disabled~.form-check-label,
.form-check-input[disabled]~.form-check-label {
    cursor: default;
    opacity: 1;
}

/* ==================
   Modal Header 
   ================== */

.atoz-modal-box {
    border: 1px solid #f6851f;
    border-radius: 12px;
    overflow: hidden;
}

.atoz-modal-header {
    background-color: #203a43;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ==================
   Color Styles 
   ================== */

.atoz-input-border {
    border: 1px solid #F6851F;
}

/* =========================================
   * is red in all fields where it's applied
   ======================================== */

.required-star {
    color: red;
}

/* ===========================
   Field Label and Description 
   ========================== */

.field-label {
    font-weight: 600;
    /* Highlights field titles */
}

/* Field description styling */
.field-description {
    /* font-size: 0.875rem; */
    /* font-weight: 400; */
    /* color: #6c757d; */
    /* Muted gray for description */
    /* margin-left: 4px; */
    font-size: 0.8rem;
    /* Smaller font size */
    color: #7A7A7A;
    /* Light gray for description */
    /* font-style: italic; */
    /* Italicized text */
}

/* Placeholder Styling */
.placeholder-small::placeholder {
    font-size: 0.8rem;
    /* Small font size */
    color: #A4A4A4;
    /* Light gray color */
    /* font-style: italic; */
    /* Italicized text */
}

/* ==================
   Form Help
   ================== */

.atoz-form-note-muted {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}