/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: May 13 2025 | 00:36:39 */
/* General body styling for centering and background */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center; /* Changed: Aligns content vertically to the center for desktop container look */
    min-height: 100vh;
    background-color: #eef2f7;
    margin: 0;
    padding: 0; /* Body padding removed for full-width container on mobile */
    box-sizing: border-box;
    color: #333;
    /* ADDED: Prevent text size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

#simulator-container {
    background-color: #ffffff;
    border-radius: 12px; /* CHANGED: Rounded corners like the modal */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); /* UPDATED: Stronger shadow like the modal */
    width: 100%;
    max-width: 750px; /* Kept: Suitable max-width for simulator content */
    height: auto; /* CHANGED: Height determined by content */
    max-height: 95vh; /* ADDED: Limits the container's height to prevent it from exceeding viewport */
    margin: 20px auto; /* ADDED: Adds vertical margin and centers horizontally */
    overflow-y: auto; /* CHANGED: Allows the entire simulator container to scroll if its content exceeds max-height */
    display: none;
    flex-direction: column;
    position: relative;
    /* ADDED: Ensure container takes full width on smaller screens */
    box-sizing: border-box;
    padding: 0; /* Ensure no padding pushes content off-screen */
}

.simulator-active {
    display: flex !important;
}
.body-modal-open {
     /* backdrop-filter: blur(3px); */
     /* ADDED: Prevent scrolling on body when modal is open */
     overflow: hidden;
}

/* App Header Styling */
#app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    color: #2c3e50;
    padding: 8px 12px; /* REDUCED padding */
    border-bottom: 1px solid #dee2e6;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0; /* Prevent header from shrinking */
}

#app-header h1 {
    margin: 0;
    font-size: 1.2em; /* REDUCED font size */
    font-weight: 600;
    text-align: center;
    flex-grow: 1;
    padding: 0 10px;
}

#logo-left, #logo-right {
    height: 30px; /* REDUCED height */
    width: auto;
    object-fit: contain;
}

#logo-left {
     margin-right: 10px;
}
#logo-right {
     margin-left: 10px;
}

/* Scenario Description Area Styling */
#scenario-description-area {
    padding: 8px 12px; /* REDUCED padding */
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.85em; /* REDUCED font size */
    color: #495057;
    line-height: 1.5;
    flex-shrink: 0; /* Prevent from shrinking */
}
#scenario-description-area h3 {
display: none; /* This will hide the heading text */
    margin-top: 0;
    margin-bottom: 5px; /* REDUCED margin */
    font-size: 1em; /* REDUCED font size */
    color: #007bff;
}
#scenario-description-area p {
    margin-top: 0;
    margin-bottom: 5px;
}
#transport-status {
    font-weight: 600;
    color: #218838;
    margin-top: 10px;
    padding: 8px;
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    border-radius: 6px;
    display: none;
    font-size: 0.9em;
}

/* Log area for conversation display */
#conversation-log {
    flex-grow: 1; /* Takes up available vertical space */
    overflow-y: auto; /* REVERTED: Allows internal scrolling */
    padding: 10px; /* REDUCED padding */
    background-color: #f9f9f9;
    border-bottom: 1px solid #dee2e6;
    min-height: 60px; /* REDUCED min-height */
    max-height: 35vh; /* ADDED max-height */
     /* ADDED: Allow conversation log to take up available space */
    flex-basis: 0;
}

.student-speech, .patient-speech, .system-message {
    padding: 6px 10px; /* REDUCED padding */
    border-radius: 18px;
    margin-bottom: 8px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.student-speech {
    background-color: #007bff;
    color: #fff;
    margin-left: auto;
    text-align: left;
    border-bottom-right-radius: 6px;
}

.patient-speech {
    background-color: #e9ecef;
    color: #343a40;
    margin-right: auto;
    text-align: left;
    border-bottom-left-radius: 6px;
    font-style: italic;
    font-size: 0.8em; /* REDUCED font size */
}

.system-message {
    background-color: #6c757d;
    color: #fff;
    margin-right: auto;
    text-align: left;
    font-style: italic;
    font-size: 0.8em; /* REDUCED font size */
}

/* Input Area Styling */
#input-area {
    display: flex;
    padding: 8px 12px; /* REDUCED padding */
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    align-items: center;
    flex-shrink: 0; /* Prevent from shrinking */
     /* ADDED: Ensure input area takes full width */
    width: 100%;
    box-sizing: border-box;
}

/* Bottom Info Container for Vitals and Meds */
#bottom-info-container {
    width: 100%;
    background-color: #343a40;
    max-height: 25vh; /* REDUCED max-height */
    overflow-y: auto; /* REVERTED: Allows internal scrolling */
    flex-shrink: 0; /* Prevent from shrinking */
}

.info-display-area {
    padding: 10px; /* REDUCED padding */
    background-color: #343a40;
    color: #f8f9fa;
}
.info-display-area:first-child {
    border-top: none; /* Remove top border for the first info area in the container */
}
.info-display-area h3 {
    margin-top: 0;
    margin-bottom: 8px; /* REDUCED margin */
    font-size: 1em; /* REDUCED font size */
    color: #f8f9fa;
    text-align: center;
    font-weight: 600;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 5px; /* REDUCED gap */
     /* ADDED: Ensure grid items don't overflow horizontally */
    overflow-x: auto;
    padding-bottom: 5px; /* Add some padding if horizontal scrollbar appears */
}
.info-item.vital-card, .info-item.med-card {
    background-color: #495057;
    padding: 5px; /* REDUCED padding */
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-left: 3px solid #007bff;
}
.vital-card .info-label, .med-card .info-label {
    font-weight: 500;
    color: #adb5bd;
    font-size: 0.6em; /* REDUCED font size */
    margin-bottom: 2px;
    text-transform: uppercase;
}
.vital-card .info-value {
    color: #fff;
    font-size: 1.1em; /* REDUCED font size */
    font-weight: 700;
    line-height: 1;
    margin: 0;
}
 .med-card .info-value {
    font-size: 0.7em; /* REDUCED font size */
    font-weight: 600;
    margin-top: 1px;
}
.vital-card .info-unit, .med-card .info-details {
    font-size: 0.55em; /* REDUCED font size */
    color: #ced4da;
    margin-top: 1px;
}

#vital-item-hr { border-left-color: #e83e8c; }
#vital-item-hr .info-value { color: #f06595; }
#vital-item-bp { border-left-color: #fd7e14; }
#vital-item-bp .info-value { color: #ff9a3c; }
#vital-item-spo2 { border-left-color: #20c997; }
#vital-item-spo2 .info-value { color: #48d6a9; }
#vital-item-rr { border-left-color: #6610f2; }
#vital-item-rr .info-value { color: #8540f5; }
#vital-item-temp { border-left-color: #ffc107; }
#vital-item-temp .info-value { color: #ffd037; }

.med-card { border-left-color: #17a2b8; }
.med-card .info-value.med-administered { color: #48d6a9; }
.med-card .info-value.med-not-administered { color: #adb5bd; }

#student-input {
    flex-grow: 1;
    padding: 8px 10px; /* REDUCED padding */
    border: 1px solid #ced4da;
    border-radius: 6px;
    margin-right: 8px;
    font-size: 0.85em; /* REDUCED font size */
     /* ADDED: Ensure input takes up available space */
    width: 100%;
    box-sizing: border-box;
}
/* Removed #send-button styling */
#arrive-hospital-button {
    padding: 8px 12px; /* REDUCED padding */
    font-size: 0.85em; /* REDUCED font size */
    margin-left: 5px;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.65);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    color: #333;
    margin: auto;
    padding: 25px;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    position: relative;
    text-align: left;
}
.modal-content h3 {
    text-align: center;
    margin-top:0;
    margin-bottom: 20px;
    color: #343a40;
    font-size: 1.4em;
    font-weight: 600;
}
 .modal-content h4 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: #007bff;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    font-size: 1.1em;
}
.modal-content p {
    margin: 8px 0;
    line-height: 1.6;
    color: #495057;
}
.modal-content ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0;
     color: #495057;
}
 .modal-content li {
    margin-bottom: 5px;
}
.summary-skipped { color: #dc3545; font-weight: bold; }
.summary-performed { color: #28a745; }
.summary-grade {
    font-size: 1.15em;
    font-weight: bold;
    text-align: center;
    margin-top: 18px;
    padding: 10px;
    border-radius: 8px;
}
.summary-grade .pass { color: #155724; background-color: #d4edda; border: 1px solid #c3e6cb; }
.summary-grade .fail { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb; }
.summary-validation-code { font-size: 0.8em; color: #6c757d; text-align: center; margin-top: 12px; word-break: break-all; }
.summary-actions { margin-top: 20px; text-align: center; display: flex; gap: 10px; justify-content: center; }
.summary-actions button { padding: 10px 15px; background-color: #6c757d; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9em; transition: background-color 0.2s; }
.summary-actions button:hover { background-color: #5a6268; }

.close-button { color: #aaa; position: absolute; top: 12px; right: 18px; font-size: 28px; font-weight: bold; }
.close-button:hover, .close-button:focus { color: #333; text-decoration: none; cursor: pointer; }

.modal-options { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.modal-option-button { padding: 12px 15px; background-color: #007bff; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 1em; transition: background-color 0.2s; }
.modal-option-button:hover { background-color: #0056b3; }

#scenario-selection-modal .modal-content { text-align: center; max-width: 480px;  }
#scenario-selection-modal img.modal-logo { height: 45px; margin-bottom: 12px; }
#student-name-input-home, #scenario-select { width: calc(100% - 24px); padding: 10px; margin-bottom: 15px; border: 1px solid #ced4da; border-radius: 6px; font-size: 1em; }
.instructions-text { font-size: 0.85em; color: #495057; text-align: left; margin-top: 8px; margin-bottom: 18px; padding: 0 8px; line-height: 1.55; }
.instructions-text p { margin-bottom: 6px; }
#start-selected-scenario-button { padding: 12px 22px; }

@media (max-width: 600px) {
    body {
        padding: 0;
        align-items: flex-start; /* CHANGED: Reverts to top alignment on mobile for full-screen mode */
        /* ADDED: Ensure body takes full viewport height and allows scrolling */
        min-height: 100vh;
        height: 100vh; /* Explicitly set height */
        overflow: auto; /* Allow body to scroll if needed */
    }
    #simulator-container {
        border-radius: 0; /* Reverts to no border-radius for full screen on mobile */
        height: 100vh; /* Takes full viewport height on mobile */
        max-height: 100vh; /* Ensures no overflow on mobile */
        margin: 0; /* Removes margins on mobile for full screen */
        /* ADDED: Set min-height to 100% to ensure it fills the screen initially */
        min-height: 100%;
    }
    #app-header h1 { font-size: 1em; } /* REDUCED font size for mobile */
    #logo-left, #logo-right { height: 25px; } /* REDUCED height for mobile */
    #scenario-description-area { font-size: 0.8em; } /* REDUCED font size for mobile */

    #conversation-log {
        min-height: 40px; /* REDUCED min-height for mobile */
        max-height: 20vh; /* ADDED/REDUCED max-height for mobile */
         /* ADDED: Allow conversation log to shrink and grow */
        flex-grow: 1;
        flex-shrink: 1;
        flex-basis: auto; /* Allow basis to be determined by content */
    }
    .student-speech, .patient-speech, .system-message {
        font-size: 0.75em; /* REDUCED font size for messages on mobile */
    }
    #bottom-info-container {
        max-height: 25vh; /* REDUCED max-height for vitals/meds on mobile */
         /* ADDED: Ensure bottom container shrinks */
        flex-shrink: 0;
    }
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); /* Even more compact grid for cards on mobile */
        gap: 4px; /* REDUCED gap for mobile */
         /* ADDED: Ensure horizontal scrolling works */
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .info-item.vital-card, .info-item.med-card { padding: 4px; } /* REDUCED padding for mobile */
    .vital-card .info-value { font-size: 1em; } /* REDUCED font size for mobile */

    /* ADDED: Adjust input area and input field for better mobile keyboard handling */
    #input-area {
        padding: 6px 8px; /* Further reduced padding */
        flex-wrap: wrap; /* Allow items to wrap if needed */
    }
    #student-input {
        margin-right: 0; /* Remove margin to allow input to take full width */
        margin-bottom: 5px; /* Add margin below input when wrapped */
        font-size: 0.9em; /* Slightly increase font size for readability */
    }
    #arrive-hospital-button {
        margin-left: 0; /* Remove margin */
        width: 100%; /* Make button take full width when wrapped */
        text-align: center;
    }
}

/* ADDED: Style for when the keyboard is likely open */
/* This is a heuristic and might not work perfectly on all devices/browsers */
@media (max-height: 400px) { /* Assuming a small viewport height indicates keyboard is open */
    #simulator-container {
        max-height: 100vh; /* Ensure it still takes full height */
        overflow-y: auto; /* Always allow scrolling */
    }
    #conversation-log {
        max-height: 30vh; /* Reduce max height of log to leave more space */
    }
    #bottom-info-container {
        max-height: 20vh; /* Reduce max height of info area */
    }
}

