/* General Styles */
body {
    padding: 0px;
    background-color: #f8f9fa;
}

/* Layout Container */
.survey-section {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0px;
    gap: 10px;
}

/* Top Section Container */
.top-section-container {
    display: flex;
    gap: 20px;
    height: 66vh;
}

/* Report and Explanation Sections */
.report-section,
.explanation-section {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.report-section h1,
.explanation-section h1 {
    font-size: 1.75rem;
    color: #2c3e50;
}

#report-content,
#explanations-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Headers for both sections */
.report-section>div:first-child,
.explanation-section>h1 {
    padding: 10px;
    margin: 0;
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    height: 72px;
    display: flex;
    align-items: center;
}

/* Report header specific styles */
.report-section>div:first-child {
    justify-content: space-between;
}

.report-section>div:first-child h1,
.explanation-section>h1 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.card-header {
    height: 72px;
}

/* .explanation-mode-container {
    display: flex;
    align-items: center;
    gap: 10px;
} */
.explanation-mode-container {
    display: none !important;
}


.explanation-mode {
    min-width: 200px;
}

/* Section Content Styles */
.section-content {
    padding: 0.5rem 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Add spacing between paragraphs in findings and impressions */
.section-content p {
    margin-bottom: 10px;
}

/* Ensure last paragraph doesn't have extra margin */
.section-content p:last-child {
    margin-bottom: 0;
}

/* Word Mode Styles */
.word-underline {
    border-bottom: 3px solid #e8edf1;
    cursor: pointer;
    position: relative;
    display: inline;
}

.word-superscript {
    font-size: 0.5em;
    vertical-align: super;
    color: #939ba2;
    margin-left: 1px;
}

/* Sentence Mode Styles */
.sentence-underline {
    border-bottom: 3px solid #e8edf1;
    cursor: pointer;
    padding-bottom: 2px;
    display: inline;
}

/* Paragraph Styles */
.paragraph-underline {
    display: inline-block;
    white-space: normal;
    padding-bottom: 10px;
}

/* Paragraph content container for highlighting in paragraph mode */
.paragraph-content {
    display: block;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    background-color: #fbfbfb;
}

/* Common Hover Styles */
.highlight {
    background-color: #ccfee1;
    transition: background-color 0.2s ease;
}

.paragraph-highlight {
    background-color: #f2f2f2;
    transition: background-color 0.2s ease;
}

/* Explanation Items */
.explanation-item {
    padding: 0.2rem;
    border-radius: 4px;
    line-height: 1.2rem;
}

.explanation-number {
    margin-right: 0;
    font-size: 0.5em;
    vertical-align: super;
    color: #000000;
}

/* Section Headers */
.section-header {
    background-color: #e9ecef;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: bold;
}

/* Questions Section */
.questions-section {
    height: 33vh;
    padding: 10px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.questions-section h2 {
    margin: 0;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    font-size: 1.5rem;
    line-height: 1.2;
}

#questions-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

/* Form Styles */
.form-check {
    margin-bottom: 10px;
    padding-left: 2rem;
}

.form-check-input {
    margin-top: 0.3rem;
}

.form-check-label {
    margin-left: 0.5rem;
    line-height: 1.4;
}

/* Navigation and Progress */
.report-progress {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: normal;
}

/* PIN Input */
.pin-input {
    width: 50px;
    height: 50px;
    font-size: 24px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: white;
}

.pin-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Remove spinner buttons from number input */
.pin-input::-webkit-outer-spin-button,
.pin-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-input[type=number] {
    -moz-appearance: textfield;
}

.container-fluid {
    min-height: 100vh;
}

/* Survey Section Styles */
#survey-section {
    height: 100vh;
    padding: 0px;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

#survey-section .container-fluid {
    height: calc(100vh - 2rem);
}

#survey-section .row {
    height: 100%;
}

#survey-section .col-6 {
    height: 100%;
}

/* Left column card */
#survey-section .col-6:first-child .card {
    height: 98%;
}

#survey-section .col-6:first-child .card-body {
    height: calc(100% - 72px);
    overflow-y: auto;
}

/* Right column layout */
#survey-section .col-6:last-child {
    height: 98%;
    display: flex;
    flex-direction: column;
}

#explanations-card {
    flex-basis: 50%;
    min-height: 20%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    transition: flex-basis 0.1s;
}

#questions-card {
    flex-basis: 50%;
    min-height: 20%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    transition: flex-basis 0.1s;
}

#questions-card .card-body {
    flex: 1;
    overflow-y: auto;
}

#explanation-questions-divider {
    height: 10px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 5px;
    margin-top: 5px;
    cursor: row-resize;
    z-index: 2;
    transition: background 0.2s;
    position: relative;
}

#explanation-questions-divider:hover,
#explanation-questions-divider.dragging {
    background: #bdbdbd;
}

.divider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 1px;
    height: 8px;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.divider-handle span {
    display: block;
    width: 28px;
    height: 3px;
    background: #bdbdbd;
    border-radius: 2px;
    opacity: 0.8;
}

/* Ensure nav button group stays at the bottom */
#survey-section .nav-button-group {
    margin-top: auto;
    margin-bottom: 0 !important;
    padding: 10px 0px 0px 0px;
}

/* Content areas */
#report-content,
#explanations-content {
    height: 100%;
}

/* Card styles */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: white;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
    padding: 1rem;
}

.nav-button-group {
    padding: 1rem;
}

/* Form Controls */
.form-select.explanation-mode {
    width: auto;
    min-width: 200px;
}

/* Highlighted Text */
.highlighted {
    background-color: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}


/* Override mb-3 in survey section */
#explanations-card,
#questions-card {
    margin-bottom: 0px !important;
}

/* Instruction section styles */
#instruction-content {
    font-size: 1.1rem;
    line-height: 1.6;
    padding-top: 3rem;
}

#instruction-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

#instruction-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

#instruction-content p {
    margin-bottom: 1.2rem;
}

#instruction-content ul {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

#instruction-content li {
    margin-bottom: 0.5rem;
}

/* Make instruction section take full height */
#instruction-section .container {
    min-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}

#instruction-section .row:last-child {
    flex: 1;
}

#instruction-section .card {
    height: 100%;
}

#instruction-section .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#instruction-section #instruction-content {
    flex: 1;
}

#instruction-section .d-grid {
    margin-top: auto;
    padding-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #survey-section {
        height: auto;
        min-height: 100vh;
    }

    #survey-section .container-fluid {
        height: auto;
    }

    #survey-section .col-6 {
        width: 100%;
        margin-bottom: 1rem;
    }

    #survey-section .col-6:first-child .card {
        height: 50vh;
    }

    #survey-section .col-6:last-child {
        flex-direction: column;
    }

    #explanations-card,
    #questions-card {
        flex-basis: auto;
        min-height: 100px;
        max-height: none;
    }

    #explanation-questions-divider {
        height: 6px;
    }

    #questions-content {
        height: calc(200px - 120px);
    }
}

.auth-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 0px 90px 0px;
    background-image: url('/static/image/login_bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

.auth-section .auth-content {
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding: 0 100px;
    display: flex;
    justify-content: space-between;
}

.auth-section .welcome-text {
    font-size: 64px;
    font-weight: 600;
    color: #ffffff;
    max-width: 400px;
    line-height: 61px;
}

.auth-section .welcome-text-h2 {
    font-size: 48px;
    font-weight: 200;
    color: #ffffff;
}

.auth-section .logo {
    width: 450px;
    object-fit: contain;
}

.auth-section .start-button {
    width: 309px;
    height: 67px;
    background: #8C1715;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-section .start-button:hover {
    background: #6b1210;
}

.auth-section .left-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 141px;
}

.auth-section .right-content {
    display: flex;
    align-items: flex-start;
    padding-top: 238px;
}

/* Responsive styles for auth section */
@media (max-width: 1200px) {
    .auth-section .auth-content {
        padding: 0 60px;
        max-width: 1140px;
    }

    .auth-section .welcome-text {
        font-size: 54px;
        line-height: 52px;
    }

    .auth-section .welcome-text-h2 {
        font-size: 42px;
    }

    .auth-section .logo {
        width: 380px;
    }
}

@media (max-width: 992px) {
    .auth-section .auth-content {
        padding: 0 40px;
        max-width: 960px;
    }

    .auth-section .welcome-text {
        font-size: 48px;
        line-height: 46px;
    }

    .auth-section .welcome-text-h2 {
        font-size: 36px;
    }

    .auth-section .logo {
        width: 320px;
    }

    .auth-section .start-button {
        width: 260px;
        height: 60px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .auth-section .auth-content {
        padding: 0 20px;
        max-width: 720px;
        flex-direction: column;
        align-items: center;
    }

    .auth-section .left-content {
        padding-top: 60px;
        align-items: center;
        text-align: center;
    }

    .auth-section .right-content {
        padding-top: 60px;
    }

    .auth-section .welcome-text {
        font-size: 42px;
        line-height: 40px;
    }

    .auth-section .welcome-text-h2 {
        font-size: 32px;
    }

    .auth-section .logo {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .auth-section .auth-content {
        padding: 0 15px;
        max-width: 100%;
    }

    .auth-section .left-content {
        padding-top: 40px;
    }

    .auth-section .welcome-text {
        font-size: 36px;
        line-height: 34px;
    }

    .auth-section .welcome-text-h2 {
        font-size: 28px;
    }

    .auth-section .logo {
        width: 240px;
    }

    .auth-section .start-button {
        width: 220px;
        height: 54px;
        font-size: 18px;
    }
}

/* Superscript visibility toggle */
.superscripts-hidden .word-superscript,
.superscripts-hidden .sentence-superscript,
.superscripts-hidden .explanation-number {
    display: none !important;
}

/* Style for the superscript toggle switch */
#toggle-superscripts {
    cursor: pointer;
}

.form-switch .form-check-input {
    width: 2.5em;
    margin-left: -2.8em;
    height: 1.25em;
}

/* Report Title Styles */
.report-title {
    font-size: 1rem;
    font-weight: bold;
    color: #2c3e50;
    padding: 0 15px 0 15px;
    margin-bottom: 0.5rem !important;
}