/**
 * Symptom Checker Styles
 * 
 * Design inspired by the original chat-bot.css to maintain visual consistency.
 * Uses the primary blue color scheme (#027eff) from the original design.
 */

@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800|Poppins:200,300,400,500,600,700,800,900&display=swap');

/* ========================================
   Base Styles
   ======================================== */

.page-symptom-checker {
    position: relative;
    font-family: 'Open Sans', sans-serif;
    background: #FFFFFF;
    color: #027eff;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.page-symptom-checker h1,
.page-symptom-checker h2,
.page-symptom-checker h3,
.page-symptom-checker h4,
.page-symptom-checker h5,
.page-symptom-checker h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    line-height: 1.5em;
}

/* ========================================
   Loading Screen
   ======================================== */

.loading-screen {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #027eff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: left 0.3s ease-in-out;
}

.loading-screen.show {
    left: 0;
}

.loading-inner {
    padding: 50px;
}

.loading-screen h1 {
    font-size: 20px;
    color: #FFFFFF;
    margin-top: 30px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Main Wrapper
   ======================================== */

.page-symptom-checker .wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    padding-bottom: 120px;
}
.checker-landing-page.page-symptom-checker .wrapper{
    padding-bottom: 50px;
    min-height: 75vh;
}

.page-symptom-checker .wrapper .inner {
    width: 100%;
}

.page-symptom-checker .wrapper .container {
    max-width: 1300px;
    margin: 0 auto;
}


/* ========================================
   Response Container (Bot Message)
   ======================================== */

.response-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.response-container h1 {
    color: #027eff;
    font-size: 36px;
    font-weight: 300;
    line-height: 1.2em;
    margin-bottom: 15px;
    transition: all 0.5s ease-in-out;
}

.response-container h6 {
    color: #5fadff;
    font-size: 14px;
    font-weight: 600;
}

/* ========================================
   Form Container (Search Input)
   ======================================== */

.form-container {
    position: relative;
    width: 70%;
    margin: 0 auto;
    margin-bottom: 30px;
}

.form-container .search-wrapper {
    position: relative;
}

.form-container .textbox,
.form-container .search-input {
    background-color: transparent;
    color: #027eff;
    font-weight: 500;
    font-size: 16px;
    border-radius: 5px;
    border: 2px solid #027eff;
    outline: none;
    width: 100%;
    padding: 15px;
    padding-right: 100px;
    box-sizing: border-box;
}

.form-container .textbox::placeholder,
.form-container .search-input::placeholder {
    color: #5fadff;
}

.form-container .textbox:focus::placeholder,
.form-container .search-input:focus::placeholder {
    color: transparent;
}

.form-container .button-group {
    position: absolute;
    top: 10px;
    right: 10px;
}

.form-container .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.form-container .button:hover {
    opacity: 0.8;
}

.form-container .button.send {
    background-color: #027eff;
}

.form-container .button.refresh {
    background-color: #027eff;
}

/* ========================================
   Search Results Dropdown
   ======================================== */

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #FFFFFF;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 5px;
    list-style: none;
    padding: 5px 0;
    margin: 5px 0 0 0;
}

.search-results li {
    color: #374151;
    font-size: 14px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-results li:hover {
    background-color: #027eff;
    color: #FFFFFF;
}

.search-results li.already-selected {
    background-color: #f0f9ff;
    color: #6b7280;
    cursor: default;
}

.search-results li.already-selected:hover {
    background-color: #f0f9ff;
    color: #6b7280;
}

.search-results .selected-badge {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
}

/* ========================================
   Symptom List Container
   ======================================== */

.symptom-list-container {
    width: 70%;
    margin: 0 auto 30px;
    display: none;
}

.symptom-list-title {
    color: #027eff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.symptom-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.symptom-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 10px;
    padding-right: 13px;
    background: #F6F6F6;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.symptom-item:hover {
    background: #f1f5f9;
}

.symptom-item .icon-remove {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: #9ca3af;
}

.symptom-item .icon-remove:hover {
    color: #ef4444;
}

.symptom-item .symptom-name {
    flex: 1;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.no-symptoms-message {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
}

.no-symptoms-message p {
    margin: 0;
}

/* ========================================
   Submit Container
   ======================================== */

.submit-container {
    width: 70%;
    margin: 0 auto 30px;
}

.submit-symptoms {
    display: block;
    width: 100%;
    background: #027eff;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    padding: 15px;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.submit-symptoms:hover:not(:disabled) {
    background: #0066cc;
}

.submit-symptoms:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* ========================================
   Common Symptoms
   ======================================== */

/* ========================================
   Common Symptoms Section
   ======================================== */

.option_symptoms {
    width: 70%;
    margin: 0 auto;
    margin-bottom: 30px;
    display: none;
}

.option_symptoms .inner ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.option_symptoms ul li {
    position: relative;
    padding: 25px;
    padding-left: 110px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5em;
    cursor: pointer;
    display: block;
    width: 100%;
    color: #374151;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.option_symptoms ul li:hover {
    background: #f1f5f9;
}

.option_symptoms ul li:last-child {
    margin-bottom: 0px;
}

.option_symptoms ul li .toggle-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    width: 75px;
    height: 38px;
    background-image: url('../images/toggle-button-symptom-checker.png');
    background-size: 75px 76px;
    background-repeat: no-repeat;
    background-position: center 0;
    cursor: pointer;
}

.option_symptoms ul li.checked .toggle-icon {
    background-position: center -38px;
}

.option_symptoms ul li .overlay {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 70px;
    height: 100%;
    text-indent: -99999px;
    cursor: pointer;
    z-index: 10;
}

.option_symptoms .send_ans {
    width: 100%;
    display: block;
    background: #027eff;
    color: #FFFFFF;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    opacity: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option_symptoms .send_ans:hover {
    background: #0066cc;
}

.option_symptoms .send_ans.hide {
    display: none;
}

/* ========================================
   Common Symptoms
   ======================================== */

.common-symptoms {
    width: 70%;
    margin: 0 auto;
    margin-bottom: 50px;
}

.common-symptoms h6 {
    color: #027eff;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.common-symptoms .entries {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.common-symptoms a,
.symptom-tag {
    background: #027eff;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 15px;
    display: inline-block;
    border-radius: 7px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.common-symptoms a:hover,
.symptom-tag:hover {
    background: #0066cc;
    color: #FFFFFF;
}

.clear {
    clear: both;
}

/* ========================================
   Tap to Speak (Voice Input)
   ======================================== */

.tap-to-speak {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #027eff;
    color: #FFFFFF;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    z-index: 999;
    transition: background 0.2s ease;
}

.tap-to-speak:hover {
    background-color: #0066cc;
}

.tap-to-speak img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

.tap-to-speak h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #FFFFFF;
}

/* ========================================
   Responsive Styles - Mobile
   ======================================== */

@media only screen and (max-width: 600px) {
    
    .page-symptom-checker .wrapper {
        min-height: auto;
        display: block;
        padding-bottom: 150px;
    }
    
    .response-container {
        margin-top: 20px;
        padding: 0 15px;
    }
    
    .response-container h1 {
        font-size: 24px;
        line-height: 1.3em;
        margin-bottom: 15px;
    }
    
    .form-container {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .form-container .textbox,
    .form-container .search-input {
        font-size: 16px;
        padding: 12px;
        padding-right: 90px;
    }
    
    .form-container .button {
        background-size: 20px 20px;
        width: 35px;
        height: 35px;
    }
    
    .symptom-list-container {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .submit-container {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .common-symptoms {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .common-symptoms a,
    .symptom-tag {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .tap-to-speak {
        padding: 20px;
    }
    
    .tap-to-speak img {
        width: 35px;
        height: 35px;
    }
    
    .tap-to-speak h1 {
        font-size: 14px;
    }
    
}

/* ========================================
   Responsive Styles - Tablet
   ======================================== */

@media only screen and (min-width: 601px) and (max-width: 1024px) {
    
    .response-container h1 {
        font-size: 30px;
    }
    
    .form-container {
        width: 80%;
    }
    
    .symptom-list-container {
        width: 80%;
    }
    
    .submit-container {
        width: 80%;
    }
    
    .common-symptoms {
        width: 80%;
    }
    
}

/* ========================================
   Animation Classes
   ======================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .tap-to-speak,
    .loading-screen,
    .button-group {
        display: none !important;
    }
}

/* ========================================
   Symptom Selection Popup (SweetAlert)
   ======================================== */

.symptom-selection-popup {
    text-align: left;
}

.symptom-selection-popup .popup-description {
    margin-bottom: 15px;
    color: #6b7280;
    font-size: 14px;
}

.symptom-selection-popup .symptom-options-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.symptom-selection-popup .symptom-option {
    margin-bottom: 8px;
}

.symptom-selection-popup .symptom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.symptom-selection-popup .symptom-checkbox-label:hover {
    background: #e0f2fe;
}

.symptom-selection-popup .symptom-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #027eff;
    cursor: pointer;
}

.symptom-selection-popup .symptom-checkbox-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
}


/* Header */
.logo{
    max-width: 250px;
    height: auto;
}

.button-group a{
    background-color: none!important;
    border: 2px solid var(--theme-bg);
    color: var(--theme-bg);
    padding: 3px 8px;
    border-radius: 3px;
}
.button-group a:hover{
    background-color: var(--theme-bg);
    color: #FFFFFF;
    text-decoration: none;
}