/* Main Container */
.triage-widget-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Screening Section */
.triage-screening {
    background-color: #ffffff;
    padding: 40px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.screening-step {
    animation: fadeIn 0.3s ease-in-out;
}

.screening-question {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 25px;
}

.screening-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.screening-btn {
    padding: 12px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #cc0000;
}

.btn-yes {
    background-color: #cc0000;
    color: white;
    border-color: #cc0000;
}

.btn-no {
    background-color: #ffffff;
    color: #cc0000;
    border-color: #cc0000;
}

.screening-btn.btn-yes:hover,
.screening-btn.btn-no:hover {
    background-color: #AE0000 !important;
    color: white !important;
    border-color: #AE0000 !important;
}

.screening-message {
    padding: 20px;
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 6px;
    color: #991b1b;
    margin-top: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.screening-message p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #1f2937;
}

.screening-link-btn {
    display: inline-block;
    background-color: #FFFFFF;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    color: #AE0000;
    border: 1px solid #AE0000;
    border-radius: 100px;
    padding: 10px 30px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    margin-bottom: 10px;
}

.screening-link-btn:hover {
    background-color: #AE0000;
    color: #FFFFFF;
}

.screening-restart-btn,
.screening-back-btn {
    display: inline-block;
    background-color: #FFFFFF !important;
    font-family: 'Segoe UI', sans-serif !important;
    font-weight: 600 !important;
    color: #AE0000 !important;
    border: 1px solid #AE0000 !important;
    border-radius: 100px !important;
    padding: 10px 30px !important;
    font-size: 16px !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    line-height: normal !important;
}

.screening-restart-btn:hover,
.screening-back-btn:hover {
    background-color: #AE0000 !important;
    color: #FFFFFF !important;
    border-color: #AE0000 !important;
    text-decoration: none !important;
}

.print-value {
    display: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #000;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.triage-form {
    background-color: #ffffff;
    width: 100%;
    /* max-width removed here as it is handled by container */
    padding: 30px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    position: relative;
}

.triage-form * {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.triage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.triage-logo-container {
    flex: 0 0 auto;
}

.triage-logo {
    max-height: 80px;
    width: auto;
}

.form-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-top: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #cc0000;
    padding-bottom: 10px;
}

/* Patient Info */
.patient-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Floating Label Inputs */
.floating-group {
    position: relative;
    flex: 1;
}

.floating-input {
    width: 100%;
    padding: 14px 10px 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 15px;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
    color: #1f2937;
}

.floating-input:focus {
    border-color: #cc0000;
}

.floating-label {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.2s ease;
    background-color: #ffffff;
    padding: 0 4px;
}

.floating-input:focus~.floating-label,
.floating-input:not(:placeholder-shown)~.floating-label {
    top: -9px;
    left: 10px;
    font-size: 13px;
    color: #cc0000;
    font-weight: 500;
}

/* Specific adjustment for Clinician Initials */
.clinician-group {
    margin-left: 0;
    max-width: 100%;
    margin-top: 20px;
}

/* Columns */
.triage-columns {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.triage-col {
    flex: 1;
}

.section-heading {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #374151;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #374151;
    cursor: pointer;
    line-height: 1.4;
}

.symptom-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    cursor: pointer;
    accent-color: #cc0000;
}

.checkbox-wrapper {
    overflow: hidden;
}

.symptom-details {
    margin-top: 4px;
    margin-left: 34px;
    width: calc(100% - 34px) !important;
    max-width: calc(100% - 34px) !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #374151;
    background-color: #fafafa;
}

.days-sick-input {
    width: 80px;
    max-width: 80px;
    min-width: 80px;
    flex: 0 0 80px;
    border: none;
    border-bottom: 1px solid #9ca3af;
    font-size: 16px;
    color: #1f2937;
    background-color: #ffffff;
    padding: 0 4px;
    text-align: center;
}

/* Divider */

/* DOB Dropdown Selects */
.dob-select-group {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.dob-select-group select {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    background-color: #fff;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.dob-select-group select:focus {
    border-color: #cc0000;
}

.dob-select-group label {
    font-size: 12px;
    color: #cc0000;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.triage-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 20px 0;
}

/* Notes */
.notes-section {
    margin-bottom: 20px;
}

.notes-box {
    width: 100%;
    height: 150px;
    border: 1px solid #d1d5db;
    background-color: #fafafa;
    border-radius: 6px;
    padding: 15px;
    font-family: inherit;
    resize: vertical;
}

/* Appointment Table */
.appointment-section {
    page-break-inside: avoid;
    display: none !important;
    /* Hidden on screen */
}

.appt-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #1f2937;
    margin-top: 15px;
}

.appt-table thead {
    display: none;
}

.appt-table tr {
    margin-bottom: 10px;
    border: 1px solid #1f2937;
    border-radius: 4px;
    padding: 8px;
}

.appt-table td {
    text-align: right;
    padding: 4px 8px;
    position: relative;
    padding-left: 50%;
    min-height: 24px;
}

.appt-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 8px;
    font-weight: 600;
    color: #374151;
    text-align: left;
}

.appt-row-label {
    font-weight: 700;
    color: #1f2937;
    text-align: left !important;
    padding-left: 8px !important;
}

.appt-row-label::before {
    display: none;
}

/* Actions */
.triage-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.print-btn {
    padding: 12px 30px;
    background-color: #cc0000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.print-btn:hover {
    background-color: #AE0000;
}

/* Hidden from user (doctors section) */
.hidden-from-user {
    display: none !important;
}

/* =========================
   PRINT STYLES
   ========================= */
@media print {

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        margin: 0;
        padding: 0;
        background: white;
    }

    body>*:not(.triage-widget-container),
    .triage-widget-container>*:not(.triage-form) {
        display: none !important;
    }

    .triage-form.hidden {
        display: block !important;
    }

    .triage-widget-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .triage-form {
        box-shadow: none;
        padding: 15px;
        max-width: 100%;
        width: 100%;
    }

    .appointment-section {
        display: block !important;
        page-break-inside: avoid;
    }

    .hidden-from-user {
        display: block !important;
    }

    .appt-table,
    .appt-table tbody,
    .appt-table tr,
    .appt-table td,
    .appt-table th {
        display: table-cell !important;
    }

    .appt-table {
        display: table !important;
        width: 100% !important;
    }

    .appt-table tbody {
        display: table-row-group !important;
    }

    .appt-table tr {
        display: table-row !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .appt-table thead {
        display: table-header-group !important;
    }

    .appt-table td,
    .appt-table th {
        border: 1px solid #1f2937 !important;
        padding: 6px 8px !important;
        text-align: center !important;
        padding-left: 8px !important;
    }

    .appt-table td::before {
        display: none !important;
    }

    .appt-row-label {
        text-align: left !important;
    }

    .triage-actions {
        display: none !important;
    }

    .patient-info {
        margin-bottom: 10px;
    }

    .triage-columns {
        margin-bottom: 10px;
    }

    .notes-section {
        margin-bottom: 10px;
    }

    .notes-box {
        height: 80px;
    }

    .triage-screening {
        display: none !important;
    }

    @page {
        size: A4;
        margin: 10mm;
    }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 600px) {
    .triage-screening {
        padding: 25px 15px;
    }

    .screening-options {
        flex-direction: column;
        align-items: center;
    }

    .screening-btn {
        width: 100%;
        max-width: 250px;
    }

    .triage-form {
        padding: 15px;
    }

    .patient-info {
        flex-direction: column;
        gap: 20px;
    }

    .floating-group {
        min-width: 100%;
    }

    .clinician-group {
        margin-left: 0;
        max-width: 100%;
        margin-top: 20px;
    }

    .appt-table,
    .appt-table tbody,
    .appt-table tr,
    .appt-table td {
        display: block;
        width: 100%;
    }

    .appt-table thead {
        display: none;
    }

    .appt-table tr {
        margin-bottom: 10px;
        border: 1px solid #1f2937;
        border-radius: 4px;
        padding: 8px;
    }

    .appt-table td {
        text-align: right;
        padding: 4px 8px;
        position: relative;
        padding-left: 50%;
        min-height: 24px;
    }

    .appt-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 8px;
        font-weight: 600;
        color: #374151;
        text-align: left;
    }

    .appt-row-label {
        font-weight: 700;
        color: #1f2937;
        text-align: left !important;
        padding-left: 8px !important;
    }

    .appt-row-label::before {
        display: none;
    }

    .triage-columns {
        flex-direction: column;
    }

    .section-heading {
        font-size: 13px;
    }
}