.form-header {
    padding: 25px 0px 0px;
    text-align: center;
    background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
    color: rgb(255, 255, 255) !important;
}

.form-header p {
    margin-bottom: 0px;
    padding-bottom: 0px;
    opacity: 1;
    font-weight: 700;
    font-family: Poppins, sans-serif;
    padding-right: 0px;
    line-height: 2.2 !important;
    border-width: 1px 0px 3px !important;
    border-right-style: initial !important;
    border-left-style: initial !important;
    border-right-color: initial !important;
    border-left-color: initial !important;
    border-image: initial !important;
    font-size: 26px !important;
    text-transform: uppercase !important;
    letter-spacing: -0.1px !important;
    color: rgb(216, 227, 255) !important;
    box-shadow: rgb(51 51 51) -2px 1px 1px 1px, rgb(169 106 106 / 0%) -1px 0px 0px 2px !important;
    border-bottom-color: rgb(0 0 0) !important;
}

@media (max-width: 976px) {

    .form-header p {
        font-size:16px !important;
    }
}

@media (max-width: 1024px) {
    .form-header {
        padding: 25px 0px;
        padding-bottom: 0px;
    }
}

#virtualAppointmentForm input, #virtualAppointmentForm textarea, #virtualAppointmentForm select {
    color: rgb(51, 51, 51) !important;
    font-weight: 500 !important;
}

#virtualAppointmentForm input:focus, #virtualAppointmentForm textarea:focus, #virtualAppointmentForm select:focus {
    outline: none;
}

/* Cross-browser placeholder styles */
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
    color: rgb(102, 102, 102) !important;
    font-weight: 500 !important;
    letter-spacing: -0.00766rem !important;
    font-family: sans-serif !important;
}

input::-moz-placeholder, textarea::-moz-placeholder {
    color: rgb(102, 102, 102) !important;
    font-weight: 500 !important;
    letter-spacing: -0.00766rem !important;
    font-family: sans-serif !important;
}

input:-ms-input-placeholder, textarea:-ms-input-placeholder {
    color: rgb(102, 102, 102) !important;
    font-weight: 500 !important;
    letter-spacing: -0.00766rem !important;
    font-family: sans-serif !important;
}

input::placeholder, textarea::placeholder {
    color: #666666 !important;
    font-weight: 500 !important;
    letter-spacing: -0.00766rem !important;
    font-family: sans-serif !important;
}

/* Ensure BOTH phone number placeholders match other fields */
#phone_number::placeholder,
#emergency_contact_phone::placeholder {
    color: #666 !important;
    font-weight: 500 !important;
    letter-spacing: unset !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif !important;
    opacity: 1 !important;
}

/* Phone number Inputmask styling - GREY by default, DARK BLACK on focus/filled */
#phone_number {
    color: rgb(102, 102, 102) !important; /* Grey mask characters when empty */
    font-size: 14px !important; /* Prevent Inputmask FOUC */
}

#phone_number:focus,
#phone_number[data-clean-phone]:not([data-clean-phone=""]) {
    color: #333333 !important; /* Dark black when focused OR has value */
}

/* Emergency contact phone - same behavior as main phone */
#emergency_contact_phone {
    color: rgb(102, 102, 102) !important; /* Grey mask characters when empty */
    font-size: 14px !important; /* Prevent Inputmask FOUC */
}

#emergency_contact_phone:focus,
#emergency_contact_phone[data-clean-phone]:not([data-clean-phone=""]) {
    color: #333333 !important; /* Dark black when focused OR has value */
}

.consent-checkboxes .checkbox-group {
    display: flex;
    padding: 16px;
    margin: 16px 0px;
    cursor: pointer;
    border-radius: 8px;
    justify-content: center;
    transition: none !important;
    color: rgb(255, 234, 216) !important;
    background: linear-gradient(168deg, rgb(22, 57, 152) 0%, rgb(0, 15, 39) 100%) !important;
}

.checkbox-group input[type="checkbox"] {
    accent-color: rgb(255, 198, 0);
}

.health-card-option.selected {
    background-color: var(--light-blue);
    box-shadow: rgba(0, 0, 0, 0.28) 2px 3px 9px 9px inset;
    border-style: solid;
    border-image: initial;
    border-width: 4px !important;
    border-color: rgb(233, 208, 0) !important;
    transition: none !important;
}

input#healthCardNo:checked {
    appearance: none;
    border: 5px solid rgba(0, 0, 0, 0.92) !important;
    outline: rgba(255, 228, 0, 0.92) solid 4px !important;
}

input#healthCardNo {
    border-radius: 50%;
    -webkit-tap-highlight-color: rgba(184, 139, 0, 0.3);
    appearance: none;
    border: 5px solid rgb(255, 255, 255) !important;
    outline: rgb(143, 156, 201) solid 4px !important;
    background-color: rgb(0, 0, 0) !important;
    font-size: unset !important;
    padding: unset !important;
}

input#healthCardYes {
    border-radius: 50%;
    -webkit-tap-highlight-color: rgba(184, 139, 0, 0.3);
    appearance: none;
    border: 5px solid rgb(255, 255, 255) !important;
    outline: rgb(143, 156, 201) solid 4px !important;
    background-color: rgb(0, 0, 0) !important;
    font-size: unset !important;
    padding: unset !important;
}

input#healthCardYes:checked {
    appearance: none;
    border: 5px solid rgba(0, 0, 0, 0.92) !important;
    outline: rgba(255, 228, 0, 0.92) solid 4px !important;
}

input#existing_yes:checked {
    appearance: none;
    border: 5px solid rgba(0, 0, 0, 0.92) !important;
    outline: rgba(255, 228, 0, 0.92) solid 4px !important;
}

input#existing_yes {
    border-radius: 50%;
    -webkit-tap-highlight-color: rgba(184, 139, 0, 0.3);
    appearance: none;
    border: 5px solid rgb(255, 255, 255) !important;
    outline: rgb(143, 156, 201) solid 4px !important;
    background-color: rgb(0, 0, 0) !important;
    font-size: unset !important;
    padding: unset !important;
}

input#existing_no {
    border-radius: 50%;
    -webkit-tap-highlight-color: rgba(184, 139, 0, 0.3);
    appearance: none;
    border: 5px solid rgb(255, 255, 255) !important;
    outline: rgb(143, 156, 201) solid 4px !important;
    background-color: rgb(0, 0, 0) !important;
    font-size: unset !important;
    padding: unset !important;
}

input#existing_no:checked {
    appearance: none;
    border: 5px solid rgba(0, 0, 0, 0.92) !important;
    outline: rgba(255, 228, 0, 0.92) solid 4px !important;
}

button.submit-btn:focus-visible, i.fas.fa-arrow-right:focus-visible {
    background: radial-gradient(circle, rgb(255, 237, 83) 15%, rgb(255, 229, 17) 74%, rgb(255, 233, 49) 78%, rgb(255, 234, 53) 100%);
    outline: 0px !important;
}

.health-card-option.selected, .health-card-option label {
    color: rgb(255, 255, 255) !important;
}

.radio-option.selected label {
}

#consentEmergency {
    position: relative;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    overflow: hidden;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background-color: rgb(255, 255, 255) !important;
    border: 5.5px solid rgb(255, 165, 0) !important;
}

input#consentEmergency:checked {
    background: rgb(233, 208, 0) !important;
    border-color: inherit !important;
    padding: 10px !important;
}

button.back-btn:focus-visible, i.fas.fa-arrow-left:focus-visible {
    background: radial-gradient(circle, #f2f2f2 15%, #eaeaea 74%, #e8e8e8 78%, #f4f4f4 100%);
    outline: 0px !important;
}

.consent-checkboxes .checkbox-group:has(input:checked) {
    border-color: rgb(233, 208, 0) !important;
}

#consentEmergency {
}

#consentEmergency:checked::after {
}

#consentEmergency {
    position: relative;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    overflow: hidden;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background-color: rgb(255, 255, 255) !important;
    border: 5.5px solid rgb(255, 165, 0) !important;
    padding: 10px !important;
}

#consentEmergency:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 17px;
    height: 10px;
    border-left: 4.5px solid rgb(29, 29, 29);
    border-bottom: 4px solid rgb(29, 29, 29);
    transform: translate(-50%, -60%) rotate(-45deg);
    transform-origin: center center;
    border-top-color: rgb(29, 29, 29);
    border-right-color: rgb(29, 29, 29);
    color: rgb(221, 163, 0) !important;
}

#consentLocation:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 17px;
    height: 10px;
    border-left: 4.5px solid rgb(29, 29, 29);
    border-bottom: 4px solid rgb(29, 29, 29);
    transform: translate(-50%, -60%) rotate(-45deg);
    transform-origin: center center;
    border-top-color: rgb(29, 29, 29);
    border-right-color: rgb(29, 29, 29);
    color: rgb(221, 163, 0) !important;
}

#consentEligibility:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 17px;
    height: 10px;
    border-left: 4.5px solid rgb(29, 29, 29);
    border-bottom: 4px solid rgb(29, 29, 29);
    transform: translate(-50%, -60%) rotate(-45deg);
    transform-origin: center center;
    border-top-color: rgb(29, 29, 29);
    border-right-color: rgb(29, 29, 29);
    color: rgb(221, 163, 0) !important;
}

#consentEmail:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 17px;
    height: 10px;
    border-left: 4.5px solid rgb(29, 29, 29);
    border-bottom: 4px solid rgb(29, 29, 29);
    transform: translate(-50%, -60%) rotate(-45deg);
    transform-origin: center center;
    border-top-color: rgb(29, 29, 29);
    border-right-color: rgb(29, 29, 29);
    color: rgb(221, 163, 0) !important;
}

input#consentEmergency:hover {
    padding: 10px !important;
}

input#consentLocation {
    position: relative;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    overflow: hidden;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background-color: rgb(255, 255, 255) !important;
    padding: 10px !important;
}

input#consentLocation:checked {
    background: rgb(233, 208, 0) !important;
    border-color: inherit !important;
    padding: 10px !important;
}

input#consentEligibility {
    position: relative;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    overflow: hidden;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background-color: rgb(255, 255, 255) !important;
    padding: 10px !important;
}

input#consentEligibility:checked {
    background: rgb(233, 208, 0) !important;
    border-color: inherit !important;
    padding: 10px !important;
}

input#consentEligibility {
}

input#consentEmail {
    position: relative;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    overflow: hidden;
    appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background-color: rgb(255, 255, 255) !important;
    padding: 10px !important;
}

input#consentEmail:checked {
    background: rgb(233, 208, 0) !important;
    border-color: inherit !important;
    padding: 10px !important;
}

.radio-option:focus-visible, .radio-option label:focus-visible {
    border-color: rgb(0, 0, 0);
    background: rgb(0, 59, 154) !important;
    color: rgb(255, 255, 255) !important;
}

.radio-option:focus-visible, .radio-option:focus-within {
    border-color: rgb(0, 0, 0);
    background: rgb(0, 59, 154) !important;
    color: rgb(255, 255, 255) !important;
}

.radio-option:focus-visible label, .radio-option:focus-within label {
    color: rgb(255, 255, 255) !important;
}

@media (max-width: 1024px) {
    .form-group:not(.field-error):not(.field-valid) .input-group, .form-group:not(.field-error):not(.field-valid) .health-card-input-group, .form-group:not(.field-error):not(.field-valid) .form-group.medication-field, .form-group:not(.field-error):not(.field-valid) .custom-select {
        padding-left: 4px !important;
    }
}

input#consentEmergency:checked, input#consentLocation:checked, input#consentEligibility:checked, input#consentEmail:checked {
    border-color: rgb(255, 218, 116) !important;
    padding: 10px !important;
    background: linear-gradient(185deg, rgb(255, 237, 85) 0%, rgb(229, 201, 0) 100%) rgb(254, 223, 1) !important;
}

#consentEmergency:checked::after, #consentLocation:checked::after, #consentEligibility:checked::after, #consentEmail:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 8px;
    border-left: 3.5px solid rgb(57, 57, 57);
    border-bottom: 3px solid rgb(57, 57, 57);
    transform: translate(-50%, -60%) rotate(-45deg);
    transform-origin: center center;
    border-top-color: rgb(57, 57, 57);
    border-right-color: rgb(57, 57, 57);
    color: rgb(221, 163, 0) !important;
}

h3.form-label-title {
    text-transform: uppercase;
    font-size: 15px !important;
    color: rgb(61, 71, 100) !important;
}

#patientIntakeForm .custom-select-trigger:hover, .custom-select-text, custom-select-arrow {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 0;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    letter-spacing: -0.00766rem !important;
    transform: none !important;
    transition: none !important;
}

.custom-select-trigger.custom-select.open .custom-select-arrow {
    color: rgb(255, 255, 255) !important;
}

h3.form-label-title {
    text-transform: uppercase;
    font-size: 15px !important;
    color: rgb(61, 71, 100) !important;
}

@media (max-width: 768px) {
    #patientIntakeForm input:not(.custom-select-trigger), #patientIntakeForm textarea, #patientIntakeForm select:not(.custom-select) {
        font-size: 13px !important;
        padding: 8px !important;
    }

    #patientIntakeForm input[style*="font-size"]:not(.custom-select-trigger), #patientIntakeForm textarea[style*="font-size"], #patientIntakeForm select[style*="font-size"]:not(.custom-select) {
        font-size: 13px !important;
    }

    #patientIntakeForm input[style*="padding"]:not(.custom-select-trigger), #patientIntakeForm textarea[style*="padding"], #patientIntakeForm select[style*="padding"]:not(.custom-select) {
        padding: 8px !important;
    }
}



@media (max-width: 1024px) and (hover: hover) and (pointer: fine) {
    #patientIntakeForm .custom-select-trigger:hover, .custom-select.has-value.validated.open .custom-select-trigger.selected {
    }

    @media (max-width: 1024px) and (hover: hover) and (pointer: fine) {
        #patientIntakeForm .custom-select-trigger:hover, .custom-select.has-value.validated.open .custom-select-trigger.selected {
        }
    }
}

@media (max-width: 768px) and (hover: hover) and (pointer: fine) {
    #patientIntakeForm .custom-select-trigger:hover, .custom-select.has-value.validated.open .custom-select-trigger.selected {

        & #patientIntakeForm .custom-select-trigger:hover, & .custom-select.has-value.validated.open .custom-select-trigger.selected {
            width: 100%;
            border-radius: 8px;
            cursor: pointer;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
            overflow-wrap: break-word;
            word-break: break-word;
            -webkit-font-smoothing: antialiased;
            backface-visibility: hidden;
            image-rendering: auto;
            font-weight: 500;
            box-shadow: rgba(79, 109, 169, 0.87) 0px 0px 20px 15px inset;
            border: 0px solid rgb(13, 39, 91) !important;
            font-size: 14px !important;
            letter-spacing: -0.00766rem !important;
            transition: none !important;
            transform: none !important;
            color: rgb(255, 255, 255) !important;
            background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
            padding: 14px 16px !important;
        }
    }
}

@media (max-width: 976px) and (hover: hover) and (pointer: fine) {

}

@media (max-width: 767px) and (hover: hover) and (pointer: fine) {

}

@media (max-width: 576px) and (hover: hover) and (pointer: fine) {

    #patientIntakeForm .custom-select-trigger:hover, .custom-select.has-value.validated.open .custom-select-trigger.selected {
        font-size: 13px !important;
    }
}

@media (max-width: 476px) and (hover: hover) and (pointer: fine) {

}

@media (max-width: 400px) and (hover: hover) and (pointer: fine) {

}

.custom-select-trigger.selected:focus-visible {
    box-shadow: rgb(8, 55, 143) 0px 0px 0px 2px !important;
}

@media (max-width: 576px) and (hover: hover) and (pointer: fine) {
    #patientIntakeForm .custom-select-trigger:hover, .custom-select.has-value.validated.open .custom-select-trigger.selected {
    }
}

@media (max-width: 400px) and (hover: hover) and (pointer: fine) {
    #patientIntakeForm .custom-select-trigger:hover, .custom-select.has-value.validated.open .custom-select-trigger.selected {
    }

      .mediz-body .custom-select-trigger.selected,
      .mediz-body .custom-select.has-value .custom-select-trigger {
        padding: 12px 5px 10px !important;
        font-size: 12.5px !important;
    }

}

.custom-select-trigger.selected:focus-visible {
    outline: rgb(0, 20, 41) solid 0px;
    box-shadow: rgb(0, 31, 90) 0px 0px 5px 1px inset !important;
    border-color: rgb(9, 43, 97) !important;
}

.mediz-body input, .mediz-body textarea, .mediz-body select, .woocommerce form .select2-selection {
    color: #000000;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    background: white;
    cursor: text;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.00766rem !important;
    box-shadow: inset 0 0 20px 13px #c8c8c854;
    font-weight: 500;
    border-width: 2px !important;
}

@media (min-width: 1024px) {
    .submit-container .submit-btn {
        order: 2;
        width: 100%;
    }
}

:root {
      --primary-blue: #17449e;
      --secondary-blue: #1a4fb8;
      --light-blue: #e6f2ff;
      --success-green: #67cc33;
      --text-dark: #333333;
      --text-light: #666666;
      --border-light: #e0e0e0;
      --white: #ffffff;
    }

    body {
      font-family: 'Poppins', sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f8fafc;
      color: var(--text-dark);
    }

    /* Form Container */
    .form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    margin-top: 0px;
    margin-bottom: 0px;
    padding-bottom: 40px;
    padding-top: 40px;

    }

    .form-card {
    background: var(--white);
    background: transparent;
    border-radius: 17px;
    overflow: hidden;
    outline: 1px solid #c4c4c4;
    }

    /* Allow dropdown to show outside form card when open */
    .form-card:has(.custom-select.open) {
      overflow: visible;
    }

    /* Fallback for browsers that don't support :has() */
    .form-card.dropdown-open {
      overflow: visible !important;
    }

    /* Preserve form-header border-radius when form-card overflow is visible */
    .form-card:has(.custom-select.open) .form-header,
    .form-card.dropdown-open .form-header {
     border-top-left-radius: 17px;
    border-top-right-radius: 17px;
    overflow: hidden;
    box-shadow: none !important;
    border: 0 !important;
    border-bottom: 0px !important;
    border-top: 0px !important;
    outline: 0px solid #240000 !important;
    }

    /* Header */

    .form-header h1 {
      margin: 0;
      font-size: 28px;
      font-weight: 600;
      margin-bottom: 8px;
    }

    /* Progress Bar */
    .progress-container {
      padding: 25px 30px;
      background: #f8fafc;
      border-bottom: 1px solid var(--border-light);
      border: 1px solid #00000026;
    }

    .progress-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    border: 0px solid #00000026;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    padding: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0 !important;
    background: #433939cc;
    margin-bottom: 0px;
    padding-bottom: 0px;
    opacity: 1;
    font-weight: 700;
    font-family: Poppins, sans-serif;
    padding-right: 0px;
    border-right-style: initial !important;
    border-left-style: initial !important;
    border-right-color: initial !important;
    border-left-color: initial !important;
    border-image: initial !important;
    font-size: 26px !important;
    text-transform: uppercase !important;
    letter-spacing: -0.1px !important;
    color: rgb(216, 227, 255) !important;
    box-shadow: rgb(0, 0, 0) 1px -1px 0px 0px, rgb(255 255 255) 0px 1px 0px 0px !important;
    background-color: #b7b7b7 !important;
    }

    .progress-fill {
height: 100%;
    background: linear-gradient(348deg, #8dc154 0%, #e4ff30 50%, #42914f 100%);
    background-size: 200% 100%;
    transition: width 0.6s ease, background-position 4s ease;
    animation: progressHueShift 6s ease-in-out infinite !important;
    }

    @keyframes progressHueShift {
      0% {
        background-position: 0% 50%;
      }
      50% {
        background-position: 100% 50%;
      }
      100% {
        background-position: 0% 50%;
      }
    }

    /* Respect user's accessibility preference - only disable if they explicitly request it */
    @media (prefers-reduced-motion: reduce) {
      .progress-fill {
        animation: none;
      }
    }

    .progress-blocks {
      display: flex;
      position: absolute;
      top: 50%;
      right: 10px;
      transform: translateY(-50%);
      height: 6px;
      pointer-events: none;
    }

    .progress-block {
      flex: 1;
      height: 6px;
      border-radius: 999px;
      background: #d7dde8;
      transition: background 0.4s ease;
    }

    .progress-block.active {
      background: linear-gradient(90deg, #f5d64a 0%, #4caf50 50%, #ff9800 100%);
      background-size: 200% 100%;
      animation: progressHueShift 6s ease-in-out infinite;
    }

    /* Progress segments are flex-driven; step count handled in JS */

    .progress-label {
      text-align: center;
      margin-top: 0;
      margin-bottom: 10px;
      font-family: sans-serif;
      color: #4d4d4d;
      font-weight: 656;
      letter-spacing: -0.028rem !important;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      font-weight: 600;
      -webkit-font-smoothing: antialiased;
      font-size: 16px;
      color: #2b2424;
      -webkit-font-smoothing: antialiased;
    }

    /* Form Content */
    .form-content {
    padding: 40px 30px;
    border-radius: 17px !important;
    border-top-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
    background: #ffffff !important;
    }

    .form-group {
      margin-bottom: 25px;
    }

    .form-group label {
   flex: 1;
    margin: 0;
    margin-bottom: 0px;
    font-weight: 500;
    color: #333 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.00766rem !important;
    font-size: 16px;
    /* cursor: pointer; */
    }

    .required {
      color: #e74c3c;
    }

    /* Radio buttons */
    .radio-group {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .radio-option {
    display: inline-flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    transition: none !important;
    -webkit-transition: none !important;
    box-shadow: inset 0 0 20px 13px #c8c8c854;
    background: white;
    }

    .radio-option:hover {
    border-color: var(--primary-blue);
    border: 2px solid #d0d0d0 !important;
    background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
    color: rgb(255, 255, 255) !important;
    box-shadow: rgb(0, 54, 159) 0px 0px 0px 3px !important;
    }

    .radio-option input[type="radio"] {
      padding: 0px !important;
      margin: auto !important;
      width: 18px;
      height: 18px;
      accent-color: var(--primary-blue);
      cursor: pointer;
      box-shadow: none !important;
    }

    .radio-option.selected {
    border-color: var(--primary-blue);
    border: 2px solid #ffffff !important;
    background: #003b9a !important;
    color: rgb(255, 255, 255) !important;
    box-shadow: rgb(0, 54, 159) 0px 0px 0px 3px !important;
    background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
    }

    /* Select dropdown */
    .select-group select {
      width: 100%;
      padding: 10px 16px;
      border: 2px solid var(--border-light);
      border-radius: 8px;
      font-size: 15px;
      font-family: 'Poppins', sans-serif;
      background-color: var(--white);
      cursor: pointer;
      transition: border-color 0.2s ease;
      color: var(--text-dark);
      font-weight: 500;
      /* Remove default appearance */
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      /* Simple dropdown arrow */
      background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
      background-repeat: no-repeat;
      background-position: right 12px center;
      background-size: 16px;
      padding-right: 40px;
    }

    /* Aggressive targeting for dropdown container border-radius */
    .select-group select[size]:not([size="1"]),
    .select-group select[multiple],
    .select-group select:focus,
    .select-group select:active {
      border-radius: 8px !important;
      overflow: hidden !important;
    }

    /* Focus state */
    .select-group select:focus {
      outline: none;
      border-color: var(--primary-blue);
    }

    /* Cross-browser dropdown menu border-radius enforcement */
    .select-group select::-webkit-list-button {
      border-radius: 8px !important;
    }

    .select-group select::-moz-list-button {
      border-radius: 8px !important;
    }

    /* Style individual options */
    .select-group select option {
      padding: 8px 12px;
      font-family: 'Poppins', sans-serif;
      font-size: 15px;
      color: var(--text-dark);
      background-color: var(--white);
    }

    .select-group select option:hover,
    .select-group select option:focus {
      background-color: #f8faff;
    }

    /* Scrollbar styling */
    .select-group select::-webkit-scrollbar {
      width: 8px;
    }

    .select-group select::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 8px;
    }

    .select-group select::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      border-radius: 8px;
    }

    /* Additional border-radius enforcement for webkit-based browsers */
    @supports (-webkit-appearance: none) {
      .select-group select {
        -webkit-border-radius: 8px !important;
        border-radius: 8px !important;
      }

      .select-group select:focus,
      .select-group select:active {
        -webkit-border-radius: 8px !important;
        border-radius: 8px !important;
      }
    }

    /* Force border-radius on the actual dropdown menu popup */
    .select-group select option:first-child {
      border-top-left-radius: 8px;
      border-top-right-radius: 8px;
    }

    .select-group select option:last-child {
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
    }

    /* Additional aggressive targeting for different browsers */
    .select-group select[size] {
      border-radius: 8px !important;
      overflow: hidden !important;
    }

    /* WebKit specific dropdown styling */
    @media screen and (-webkit-min-device-pixel-ratio:0) {
      .select-group select {
        -webkit-border-radius: 8px !important;
        border-radius: 8px !important;
      }

      .select-group select:focus,
      .select-group select[size]:not([size="1"]) {
        -webkit-border-radius: 8px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
      }
    }

    /* Firefox specific */
    @-moz-document url-prefix() {
      .select-group select {
        -moz-border-radius: 8px !important;
        border-radius: 8px !important;
      }

      .select-group select:focus,
      .select-group select[size]:not([size="1"]) {
        -moz-border-radius: 8px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
      }
    }

    /* Force styling on the opened dropdown */
    .select-group select:focus option,
    .select-group select[size] option {
      border-radius: 0 !important;
    }

    .select-group select:focus option:first-child,
    .select-group select[size] option:first-child {
      border-top-left-radius: 8px !important;
      border-top-right-radius: 8px !important;
    }

    .select-group select:focus option:last-child,
    .select-group select[size] option:last-child {
      border-bottom-left-radius: 8px !important;
      border-bottom-right-radius: 8px !important;
    }

    /* Custom Dropdown Styles */
    .custom-select {
      position: relative;
      width: 100%;
      cursor: pointer;
      border-left: -17px solid #17449e;
    }

    /* ========================================
   DESKTOP CUSTOM DROPDOWN - DEFAULT STATE
   ======================================== */
    /* ========================================
   DESKTOP CUSTOM DROPDOWN - DEFAULT STATE (deduplicated)
   ======================================== */
    .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    -webkit-transition: none !important;
    -webkit-transform: none !important;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    image-rendering: auto;
    border: 2px solid rgb(0 50 150);
    border-width: 2px !important;
    background: radial-gradient(circle, rgb(61 122 249) 0%, rgb(0, 22, 120) 100%) !important;
    letter-spacing: -0.00766rem !important;
    transition: none !important;
    transform: none !important;
    font-weight: 400 !important;
    box-shadow: rgba(21, 57, 130, 0.87) 0px 0px 20px 15px inset !important;
    color: rgb(255, 255, 255) !important;
    /* font-size: 14.5px !important; */
    PADDING: 12.5PX 8px !important;
    }

#patientIntakeForm .custom-select-trigger:hover, .custom-select-text, custom-select-arrow {
    /* -webkit-font-smoothing: antialiased; */
}

#patientIntakeForm .custom-select-trigger:hover, .custom-select-text, custom-select-arrow {
    /* -webkit-font-smoothing: antialiased; */
}

       @media (max-width: 767px) and (hover: hover) and (pointer: fine) {

            .mediz-body .custom-select-trigger.selected,
            .mediz-body .custom-select.has-value .custom-select-trigger {
              PADDING: 9.5px 6.2px !important;
              padding-bottom: 9.5px !important;
              padding-top: 8.5px !important;
            }
          }

       @media (max-width: 576px) and (hover: hover) and (pointer: fine) {

            .mediz-body .custom-select-trigger.selected,
            .mediz-body .custom-select.has-value .custom-select-trigger {
              PADDING: 8.5PX !important;
              PADDING: 10PX 5px !important;
              border-width: inherit !important;
              padding-right: 9px !important;
              padding-left: initial;
            }
          }

    /* ========================================
   DESKTOP CUSTOM DROPDOWN - OPEN STATE
   ======================================== */
    .custom-select.open .custom-select-trigger {
      font-weight: 500;
      color: #333 !important;
      letter-spacing: -0.00766rem !important;
      font-family: sans-serif;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-color: rgb(50 26 28) !important;
      width: 100%;
      border-radius: 8px;
      cursor: pointer;
      background: radial-gradient(circle, rgb(12 21 38) 0%, rgb(11 68 185) 0%, rgb(16 30 90) 100%) !important;
      box-shadow: none !important;
      -webkit-transform: none !important;
      transform: none !important;
      outline: none;
      border-color: rgb(50 26 28) !important;
    }

    /* Mobile touch optimization for dropdowns */
    @media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
      .custom-select-trigger {
        /* min-height: 48px; */
        /* Better touch targets */
        /* font-size: 16px; */
        /* Prevent zoom on iOS */
      }

      .custom-select-trigger:focus {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 13px 16px !important;
        border: 1px solid #ced4da;
        border-radius: 8px;
        font-size: 14.5px !important;
        font-family: 'Poppins', sans-serif;
        cursor: pointer;
        /* transition: border-color 0.2s 
ease; */
        color: #333333;
        font-weight: 500;
        background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
        box-shadow: inset 0 0 20px 13px #c8c8c854 !important;
        border: 1px solid #ced4da !important;
      }

      .custom-select-trigger:active {
        outline: none !important;
        box-shadow: none !important;
        border-color: #ced4da !important;
        background-color: var(--white) !important;
      }

      .custom-select-trigger:focus-visible {
        outline: none !important;
        box-shadow: none !important;
      }
    }

    /* Additional mobile targeting using JavaScript-detected mobile class */
    body.is-mobile-device .custom-select-trigger:focus,
    body.is-mobile-device .custom-select-trigger:active,
    body.is-mobile-device .custom-select-trigger:focus-visible {
      outline: none !important;
      box-shadow: none !important;
      border-color: #ced4da !important;
      background-color: var(--white) !important;
    }

    .custom-select-text {
      flex: 1;
      color: #666666 !important;
      color: #ffffff !important;
      /* font-size: 14.5px !important; */
    }

    @media (max-width: 767px) and (hover: hover) and (pointer: fine) {
        .custom-select-trigger {
        }
    }


    /* When month is selected, make text black - with higher specificity */
    .custom-select.has-value .custom-select-text,
    .custom-select-options .custom-select-trigger.selected .custom-select-text,
    .custom-select[data-selected="true"] .custom-select-text {
      font-weight: 600;
      color: #000000;
      font-weight: 450;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      line-height: 0;
      -webkit-font-smoothing: antialiased;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      font-size: 14.5px !important;
      line-height: 0;
      -webkit-font-smoothing: antialiased;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      transform: none !important;
      transition: none !important;
      width: 100%;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px !important;
      font-size: 14.5px !important;
    }

    .custom-select-arrow {
      width: 16px;
      height: 16px;
      margin-left: -1px;
    }

    /* Default open state - arrow points down (towards dropdown below) */
    .custom-select.open .custom-select-arrow {
      transform: rotate(0deg);
    }

    /* When dropdown opens upward, arrow should point up (towards dropdown above) */
    .custom-select.open-upward .custom-select-arrow {
      transform: rotate(180deg) !important;
    }

    .custom-select-arrow svg {
      width: 16px;
      height: 16px;
      margin-left: -1px;
      transform: none !important;
      transition: none !important;
      color: #000 !important;
      transform-origin: left;
      position: absolute;
      overflow-clip-margin: content-box;
      stroke: #ffe400;
      stroke-width: 3px;
      stroke-linecap: square;
      stroke-linejoin: revert-layer;
      transform-origin: 3px 8px;
    }

    .custom-select-options {
      /* position: absolute; */
      /* top: 100%; */
      /* left: auto; */
      /* width: 100%; */
      /* background-color: var(--white); */
      /* border: 2px solid var(--primary-blue); */
      /* border-top: none; */
      /* border-radius: 0 0 4px 4px; */
      /* display: none; */
      /* z-index: 9999; */
      /* max-height: 300px; */
      /* overflow-y: auto; */
      /* margin: auto; */
      /* width: -webkit-fill-available; */
      /* transition: none; */
      /* Smooth transition for position changes */
    }

    .custom-select.open .custom-select-options {
      /* display: block; */
      /* position: absolute; */
      /* top: -39%; */
      /* left: auto; */
      /* width: -webkit-fill-available; */
      /* background-color: var(--white); */
      /* border: 2px solid var(--primary-blue); */
    }

    .custom-select.open .custom-select-trigger {
      border-radius: 8px 8px 0 0;
      border-color: var(--primary-blue);
    }

    /* Dropdown opening upward - must come after .open to override */
    .custom-select.open-upward .custom-select-options {
	top: auto !important;
	border-top: 1px solid var(--primary-blue) !important;
	max-height: inherit;
	bottom: 100% !important;
	border-radius: 8px 8px 0 0;
	border-top-right-radius: 8px;
	border-top-left-radius: 8px;
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
	overflow-wrap: break-word;
	word-break: break-word;
	-webkit-font-smoothing: antialiased;
	backface-visibility: hidden;
	image-rendering: auto;
	font-weight: 500;
	font-size: 14.5px !important;
	letter-spacing: -0.00766rem !important;
	transition: none !important;
	transform: none !important;
	color: rgb(255, 255, 255) !important;
	box-shadow: none !important;
	background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
	border: 2px solid #274c93 !important;
	border-color: #274c93 !important;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: absolute;
	width: -webkit-fill-available;
	}

    .custom-select.open-upward .custom-select-trigger {
      border-radius: 0 0 8px 8px !important;
    }
    .custom-option {
      /* padding: 10px 16px; */
      /* padding: 7px 13px; */
      /* font-size: 15px; */
      /* font-size: 13px; */
      /* font-family: 'Poppins', sans-serif; */
      /* color: var(--text-dark); */
      /* cursor: pointer; */
      /* line-height: 1.25; */
      /* padding-left: 7px; */
      background-color: #ffffff;
      color: #333;
    }

@media (max-width:967px) {
    .custom-option {

font-size: 12.5px;

}}

@media (max-width:567px) {
    .custom-option {

      font-size: 12px;

    }}

@media (max-width:400px) {
    .custom-option {

      font-size: 11.5px;

    }}

    .custom-option:hover {
      background-color: #f8faff;
      background-color: #c2d4ff;
      color: #000;
      font-weight: 600;
      letter-spacing: -0.018rem;
    }

    .custom-option.highlighted {
      background-color: #c2d4ff;
      color: #000;
      font-weight: 600;
      letter-spacing: -0.018rem;
    }

    .custom-option:first-child {
      border-top-left-radius: inherit;
      border-top-right-radius: inherit;
    }

    .custom-option.selected {
      /* background-color: var(--light-blue); */
      /* color: var(--primary-blue); */
      /* font-weight: 600; */
      /* letter-spacing: -0.018rem; */
    }

    .custom-option:last-child {
      /* border-radius: 0 0 8px 8px; */
      /* border-radius: 0 0 0px 0px; */
    }

    /* Scrollbar for dropdown options */
    .custom-select-options::-webkit-scrollbar {
      width: 6px;
    }

    .custom-select-options::-webkit-scrollbar-track {
      background: #f1f1f1;
    }

    .custom-select-options::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      border-radius: 3px;
    }

    .custom-select-options::-webkit-scrollbar-thumb:hover {
      background: #a1a1a1;
    }

    /* Mobile optimizations - Half-screen approach */
    @media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {

      .custom-option {

        line-height: 0;
      }

      /* Remove tap highlights and focus outlines on mobile */
      * {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
      }

      /* Allow text selection in inputs and textareas */
      input,
      textarea {
        -webkit-user-select: text !important;
        user-select: text !important;
      }

      /* Add backdrop overlay - optimized for performance */
      .custom-select.open::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 9998;
        /* Remove backdrop-filter to improve performance */
        will-change: opacity;
        transform: translateZ(0);
        /* Hardware acceleration */
      }

      .custom-select-options {
        /* position: fixed !important; */
        /* top: 40% !important; */
        /* left: 0 !important; */
        /* width: 100vw !important; */
        /* height: 100%; */
        /* max-height: 110VW; */
        /* background-color: var(--white); */
        /* border: none !important; */
        /* border-top: 3px solid var(--primary-blue) !important; */
        /* border-radius: 20px 20px 0 0 !important; */
        /* z-index: 9999; */
        /* padding-top: 60px; */
        /* padding-bottom: 40px; */
        /* Increased bottom padding for better scrolling */
        /* padding-right: 10px; */
        /* Push scrollbar away from close button */
        /* box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important; */
        /* overflow-y: auto !important; */
        /* overscroll-behavior: contain !important; */
        /* Prevent scroll chaining to background */
        /* scroll-behavior: smooth !important; */
        /* Smooth scrolling within dropdown */
        -webkit-overflow-scrolling: touch !important;
        /* Enable momentum scrolling on iOS */
        /* scroll-snap-type: none !important; */
        /* Disable scroll snapping for smooth experience */
      }


      .custom-option {
        padding: 20px 16px;
        font-size: 18px;
        border-bottom: 1px solid #f0f0f0;
        min-height: auto;
        display: flex;
        align-items: center;
        padding-top: 0px;
        padding-bottom: 0px;
      }

      .custom-option:first-child {
        margin-top: 0;
        padding-top: 20px;
      }

      .custom-select-trigger {
        padding: 14px 16px;
        /* font-size: 16px; */
        /* min-height: 48px; */
        /* min-height: 42px; */
      }

      /* Universal Mobile header for all custom dropdowns */
      .custom-select-options::before {
        content: attr(data-header-text);
        position: fixed;
        top: 25%;
        left: 0;
        width: 100%;
        padding: 20px;
        background-color: var(--primary-blue);
        color: white;
        font-weight: 600;
        text-align: center;
        z-index: 10000;
        border-radius: 20px 20px 0 0;
      }

      /* Close button */
      .custom-select-close-btn {
        position: fixed;
        top: calc(25% + 10px);
        right: 20px;
        color: white;
        font-size: 24px;
        font-weight: bold;
        z-index: 10001;
        cursor: pointer;
        background: none;
        border: none;
        padding: 5px;
      }

      /* For upward opening dropdowns */
      .custom-select.open-upward .custom-select-options::before {
        top: 0;
        border-radius: 0 0 20px 20px;
      }

      .custom-select.open-upward .custom-select-close-btn {
        /* top: 15px; */
      }
    }

    /* Additional mobile targeting using JavaScript-detected mobile class */
    body.is-mobile-device * {
      -webkit-tap-highlight-color: transparent !important;
      -webkit-touch-callout: none !important;
      -webkit-user-select: none !important;
      user-select: none !important;
    }

    /* Allow text selection in inputs and textareas */
    body.is-mobile-device input,
    body.is-mobile-device textarea {
      -webkit-user-select: text !important;
      user-select: text !important;
    }

    body.is-mobile-device .custom-select-options {
      position: fixed !important;
      top: 25% !important;
      top: 28% !important;
      left: 0 !important;
      width: 100vw !important;
      height: 75vh !important;
      max-height: 75vh !important;
      background-color: var(--white);
      border: none !important;
      border-radius: 20px 20px 0 0 !important;
      z-index: 9999;
      padding-top: 60px;
      padding-right: 10px;
      /* Push scrollbar away from close button */
      box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
      overflow-y: auto !important;
      overscroll-behavior: contain !important;
      /* Prevent scroll chaining to background */
      scroll-behavior: smooth !important;
      /* Smooth scrolling within dropdown */
      padding-bottom: 80px !important;
    }

    body.is-mobile-device .custom-select.open-upward .custom-select-options {
      position: fixed !important;
      top: 0 !important;
      bottom: auto !important;
      height: 75vh !important;
      border-top: none !important;
      border-bottom: 3px solid var(--primary-blue) !important;
      border-radius: 0 0 20px 20px !important;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
      padding-top: 60px;
      /* Space for header */
      padding-right: 10px;
      /* Push scrollbar away from close button */
      overscroll-behavior: contain !important;
      /* Prevent scroll chaining to background */
      scroll-behavior: smooth !important;
      /* Smooth scrolling within dropdown */
      -webkit-overflow-scrolling: touch !important;
      /* Enable momentum scrolling on iOS */
      scroll-snap-type: none !important;
      /* Disable scroll snapping for smooth experience */
    }

    body.is-mobile-device .custom-option {
      padding: 20px 16px;
      font-size: 18px;
      border-bottom: 1px solid #f0f0f0;
    }

    body.is-mobile-device .custom-option:first-child {
      margin-top: -5px;
    }

    /* Fallback for smaller desktop screens */
    @media (max-width: 1024px) and (hover: hover) and (pointer: fine) {
      body.is-mobile-device .new-dropdown-trigger {
        font-size: 16px;
        padding: 14px 16px;
        font-size: 16px;
        padding: 10px 6px;
        font-size: 13px !important;
        padding-top: 9px;
        padding-bottom: 9px;

      }
    }

    /* Ensure desktop behavior is maintained */
    body.is-desktop-device .custom-select-options {
      /* position: absolute; */
      /* max-height: 300px; */
    }

    /* Fallback for smaller desktop screens */
    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {
      .custom-select-options {
        max-height: 250px;
        position: absolute;
      }

      /* Allow upward positioning on small desktop screens */
      .custom-select.open-upward .custom-select-options {
        position: absolute !important;
        top: auto !important;
        bottom: 100% !important;
        border-top: 2px solid var(--primary-blue) !important;
        border-bottom: none !important;
        border-radius: 8px 8px 0 0 !important;
        max-height: 250px;
      }

      .custom-option {
        padding: -1px 3px;
        font-size: 13.5px;
        font-size: 12.5px;
        padding: 10px 9px;
        font-size: 14px;
        padding: 10px 6px;
        font-size: 13px;
        font-size: 12.5px;
        padding-top: 7px;
        padding-bottom: 7px;
      }

      .custom-select-trigger {
        padding-left: 8px !important;
        padding-right: 5px !important;
      }
    }

    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

      .mediz-body .custom-select-trigger.selected,
      .mediz-body .custom-select.has-value .custom-select-trigger {
        padding-left: 10px !important;
        padding-right: 5px !important;
      }
    }

    /* Fallback for smaller desktop screens */
    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

      .mediz-body .custom-select-trigger.selected,
      .mediz-body .custom-select.has-value .custom-select-trigger {
        padding-left: 10px !important;
        padding-right: 5px !important;
      }

      .custom-option {
        padding: 4px 3px;
        font-size: 11px;
      }

    }

    /* Textarea */
    .textarea-group textarea {
      width: 100%;
      min-height: 100px;
      padding: 10px 16px;
      border: 2px solid var(--border-light);
      border-radius: 8px;
      font-size: 15px;
      font-family: 'Poppins', sans-serif;
      resize: vertical;
      transition: border-color 0.2s ease;
      transition: none !important;
      -webkit-transition: none !important;
    }

    .textarea-group textarea:focus {
      outline: none;
      border-color: var(--primary-blue);
    }

    /* Info box */
    .info-box {
      background: #e8f4fd;
      border: 1px solid #b3d9f7;
      border-radius: 8px;
      padding: 20px;
      margin: 25px 0;
    }

    .info-box h4 {
      margin: 0 0 10px 0;
      color: var(--primary-blue);
      font-size: 16px;
      font-weight: 600;
    }

    .info-box p {
      margin: 5px 0;
      font-size: 14px;
      color: var(--text-dark);
      line-height: 1.7;
    }

    .phone-highlight {
      font-weight: 600;
      color: var(--primary-blue);
    }

    /* Checkbox */
    .checkbox-group {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 16px;
      border: 2px solid var(--border-light);
      border-radius: 8px;
      margin: 20px 0;
      cursor: pointer;
      transition: all 0.2s ease;
      user-select: none;
      /* Prevent text selection when clicking */
      transition: none !important;
      -webkit-transition: none !important;
    }

    .checkbox-group:hover {
      border-color: var(--primary-blue);
      background-color: #f8faff;
      box-shadow: 0 2px 8px rgba(23, 68, 158, 0.1);
    }

    .checkbox-group input[type="checkbox"] {
      width: 18px;
      height: 18px;
      accent-color: var(--primary-blue);
      margin-top: 2px;
      cursor: pointer;
    }

    .checkbox-group label {
      margin: 0;
      font-size: 14px;
      line-height: 1.7;
      cursor: pointer;
      flex: 1;
    }

    /* Submit button */
    .submit-container {
      text-align: center;
      padding-top: 20px;
      border-top: 1px solid var(--border-light);
      gap: 15px;
      flex-wrap: wrap;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 30px;
    }

    .submit-btn {
    transition: none !important;
    -webkit-transition: none !important;
    opacity: 1;
    background: linear-gradient(183deg, rgb(18 104 186) 0%, rgb(0 66 166) 100%);
    color: #ffdec1;
    box-shadow: 0px 1px 0px 1px #ffffff !important;
    -webkit-box-shadow: 0px 1px 0px 1px #ffffff !important;
    background-color: #000000 !important;
    margin: 0px;
    flex: 1;
    min-width: 200px;
    padding: 15px 25px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    outline-color: #003b83;
    background: linear-gradient(185deg, rgb(255, 237, 85) 0%, rgb(229, 201, 0) 100%) rgb(254, 223, 1);
    color: rgb(37, 37, 37) !important;
    letter-spacing: 0.011rem !important;
    cursor: pointer;
    border: 1px solid rgb(124 124 124 / 30%);
    }

    .submit-btn:hover {
      background-color: #000000 !important;
      background: linear-gradient(185deg, rgb(255, 246, 168) 0%, rgb(229, 201, 0) 100%) rgb(254, 223, 1);
    }

    .submit-btn:active {
      transform: translateY(0);
    }

    /* Error messages */
    .error-message {
      color: #e74c3c;
      font-size: 14px !important;
      margin-top: 4px !important;
      font-weight: 500;
      display: block;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      line-height: 1.41;
      -webkit-font-smoothing: antialiased;
      padding-left: 7px;
    }

    @media (max-width: 410px) {
      .error-message {
        color: #e74c3c;
        font-size: 12.5px !important;
        margin-top: 5px;
        font-weight: 500;
        display: block;
      }
    }

    .form-group.has-error .error-message {
      display: block;
    }

    /* Default input styling with grey border-left - applied to input-group containers like login.html */
    .form-group:not(.field-error):not(.field-valid) .input-group,
    .form-group:not(.field-error):not(.field-valid) .health-card-input-group,
    .form-group:not(.field-error):not(.field-valid) .custom-select,
    .medication-field:not(.field-error):not(.field-valid),
    .allergy-field:not(.field-error):not(.field-valid) {
      padding-left: 7px !important;
      border-left: 4px solid #b6b6b6;
    }

    @media (max-width: 1024px) {

      .form-group:not(.field-error):not(.field-valid) .input-group,
      .form-group:not(.field-error):not(.field-valid) .health-card-input-group,
      .form-group:not(.field-error):not(.field-valid) .custom-select,
      .medication-field:not(.field-error):not(.field-valid),
      .allergy-field:not(.field-error):not(.field-valid) {
        padding-left: 4px !important;
      }

    }

    /* Validation border states - override default grey */
    .form-group.field-error .input-group,
    .form-group.field-error .health-card-input-group,
    .form-group.field-error .custom-select {
      border-left: 4px solid #e74c3c !important;
      padding-left: 4px !important;
      padding-left: 7px !important;
    }

    @media (max-width: 1024px) {

      .form-group.field-error .input-group,
      .form-group.field-error .health-card-input-group,
      .form-group.field-error .custom-select {
        padding-left: 4px !important;
      }
    }

    .form-group.field-valid .input-group,
    .form-group.field-valid .health-card-input-group,
    .form-group.field-valid .custom-select {
      border-left: 4px solid #17449e !important;
      padding-left: 7px !important;
    }

    @media (max-width: 1024px) {

      .form-group.field-valid .input-group,
      .form-group.field-valid .health-card-input-group,
      .form-group.field-valid .custom-select {
        padding-left: 4px !important;
      }

    }

    /* Remove the old pseudo-element approach */
    .form-group.field-error::after,
    .form-group.field-valid::after {
      display: none;
    }

    /* Special form elements styling - only apply if no validation state */
    .form-group:not(.field-error):not(.field-valid) .health-card-selection,
    .form-group:not(.field-error):not(.field-valid) .radio-group,
    .form-group:not(.field-error):not(.field-valid) .checkbox-group {
      padding-left: 7px !important;
      border-left: 4px solid #b6b6b6;
    }

    @media (max-width: 1024px) {

      .form-group:not(.field-error):not(.field-valid) .health-card-selection,
      .form-group:not(.field-error):not(.field-valid) .radio-group,
      .form-group:not(.field-error):not(.field-valid) .checkbox-group {
        padding-left: 7px !important;
      }

    }

    .form-group.field-error .health-card-selection,
    .form-group.field-error .radio-group,
    .form-group.field-error .checkbox-group {
      border-left: 4px solid #e74c3c !important;
      padding-left: 7px !important;
    }

    /* Special styling for health card selection with errors */
    /* Create a wrapper for health card content (radio buttons + error) with border-left */
    .form-group.field-error[data-field-id="health_card_selection"] .health-card-content-wrapper {
      border-left: 4px solid #e74c3c !important;
      padding-left: 8px !important;
      border-radius: 4px;
    }

    /* Remove border from inner health-card-selection when it's inside the wrapper */
    .form-group.field-error[data-field-id="health_card_selection"] .health-card-content-wrapper .health-card-selection {
      border-left: none !important;
      padding-left: 0 !important;
    }

    /* Remove the form-group level border for health card selection */
    .form-group.field-error[data-field-id="health_card_selection"] {
      border-left: none !important;
      padding-left: 0 !important;
    }

    .form-group.field-valid .health-card-selection,
    .form-group.field-valid .radio-group,
    .form-group.field-valid .checkbox-group {
      border-left: 4px solid #17449e !important;
      padding-left: 8px !important;
    }

    /* Ensure form-groups are positioned relatively for absolute positioning of ::after */
    .form-group {
      position: relative;
    }

    /* Health Card Form Styles */
    .health-card-selection {
      display: flex;
      gap: 15px;
      margin-bottom: 20px;
    }

    .health-card-option {
      flex: 1;
      border: 1px solid #ced4da;
      border-radius: 8px;
      padding: 15px;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
    }

    .health-card-option:hover {
      border-color: #17449e;
      background-color: #f8f9ff;
    }

    .health-card-option input[type="radio"] {
      margin-right: 10px;
      accent-color: #17449e;
      transform: scale(1.2);
    }

    .health-card-option label {
      margin: 0;
      cursor: pointer;
      font-weight: 500;
      color: #3c4a73;
    }

    /* ========================================
   DESKTOP CUSTOM DROPDOWN - DEFAULT STATE
   ======================================== */
    .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    -webkit-transition: none !important;
    -webkit-transform: none !important;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    image-rendering: auto;
    border: 2px solid rgb(0 50 150);
    background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
    letter-spacing: -0.00766rem !important;
    transition: none !important;
    transform: none !important;
    font-weight: 400 !important;
    box-shadow: rgba(21, 57, 130, 0.87) 0px 0px 20px 15px inset !important;
    color: rgb(255, 255, 255) !important;
    /* font-size: 14px !important; */
    /* PADDING: 12.5PX !important; */
    /* border: 0 !important; */
    border-width: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    -webkit-transition: none !important;
    -webkit-transform: none !important;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    image-rendering: auto;
    /* border: 0px solid rgb(23, 68, 158); */
    background: radial-gradient(circle, rgb(61 122 249) 0%, rgb(0, 22, 120) 100%) !important;
    letter-spacing: -0.00766rem !important;
    transition: none !important;
    transform: none !important;
    /* font-weight: 400 !important; */
    box-shadow: rgba(21, 57, 130, 0.87) 0px 0px 20px 15px inset !important;
    color: rgb(255, 255, 255) !important;
    font-size: 14.5px !important;
    /* PADDING: 7.5PX 8px !important; */
    PADDING: 12.5PX 8px !important;
    border-width: 2px !important;
    }


#patientIntakeForm .custom-select-trigger:hover, .custom-select-text, custom-select-arrow {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif; */
    /* line-height: 0; */
    /* -webkit-font-smoothing: antialiased; */
    /* font-weight: 400; */
    /* letter-spacing: -0.00766rem !important; */
    /* transform: none !important; */
    /* transition: none !important; */
}






#patientIntakeForm .custom-select-trigger:hover, .custom-select-text, custom-select-arrow {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif; */
    /* line-height: 0; */
    /* -webkit-font-smoothing: antialiased; */
    /* font-weight: 400; */
    /* letter-spacing: -0.00766rem !important; */
    /* transform: none !important; */
    /* transition: none !important; */
}



       @media (max-width: 767px) and (hover: hover) and (pointer: fine) {

            .mediz-body .custom-select-trigger.selected,
            .mediz-body .custom-select.has-value .custom-select-trigger {
              /* PADDING: 8.5PX !important; */
              /* PADDING: 10.5pX 5px !important; */
              /* font-size: 13px !important; */
              /* border-width: inherit !important; */
              /* padding-right: 9px !important; */
              /* letter-spacing: normal !important; */
              /* padding-top: 10px !important; */
              /* padding-left: initial; */
              PADDING: 9.5px 6.2px !important;
              /* border-width: inherit !important; */
              /* padding-right: 11px !important; */
              /* padding-left: 7px !important; */
              /* padding-top: 11px !important; */
              /* padding-bottom: 8px !important; */
              padding-bottom: 9.5px !important;
              padding-top: 8.5px !important;
            }
          }



       @media (max-width: 576px) and (hover: hover) and (pointer: fine) {

            .mediz-body .custom-select-trigger.selected,
            .mediz-body .custom-select.has-value .custom-select-trigger {
              PADDING: 8.5PX !important;
              PADDING: 10PX 5px !important;
              /* font-size: 13px !important; */
              border-width: inherit !important;
              padding-right: 9px !important;
              /* letter-spacing: normal !important; */
              padding-left: initial;
            }
          }





    /* ========================================
   DESKTOP CUSTOM DROPDOWN - OPEN STATE
   ======================================== */
    .custom-select.open .custom-select-trigger {
      /* font-size: 14px !important; */
      font-weight: 500;
      color: #333 !important;
      letter-spacing: -0.00766rem !important;
      font-family: sans-serif;
      /* border: 1px solid #ced4da !important; */
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-color: rgb(50 26 28) !important;
      width: 100%;
      /* padding: 12px 13px !important; */
      border-radius: 8px;
      cursor: pointer;
      background: radial-gradient(circle, rgb(12 21 38) 0%, rgb(11 68 185) 0%, rgb(16 30 90) 100%) !important;
      box-shadow: none !important;
      -webkit-transform: none !important;
      transform: none !important;
      outline: none;
      border-color: rgb(50 26 28) !important;
      /* padding-left: 11px !important; */
      /* padding-right: 13px !important; */
    }

    /* Mobile touch optimization for dropdowns */
    @media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
      .custom-select-trigger {
        /* min-height: 48px; */
        /* Better touch targets */
        /* font-size: 16px; */
        /* Prevent zoom on iOS */
      }

      .custom-select-trigger:focus {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 13px 16px !important;
        /* border: 2px solid #17449e; */
        border: 1px solid #ced4da;
        border-radius: 8px;
        font-size: 14.5px !important;
        font-family: 'Poppins', sans-serif;
        /* background-color: var(--white); */
        cursor: pointer;
        /* transition: border-color 0.2s 
ease; */
        color: #333333;
        font-weight: 500;
        /* box-shadow: 0 0 0 0px #274c93 !important; */
        background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
        box-shadow: inset 0 0 20px 13px #c8c8c854 !important;
        border: 1px solid #ced4da !important;
      }

      .custom-select-trigger:active {
        outline: none !important;
        box-shadow: none !important;
        border-color: #ced4da !important;
        background-color: var(--white) !important;
      }

      .custom-select-trigger:focus-visible {
        outline: none !important;
        box-shadow: none !important;
      }
    }

    /* Additional mobile targeting using JavaScript-detected mobile class */
    body.is-mobile-device .custom-select-trigger:focus,
    body.is-mobile-device .custom-select-trigger:active,
    body.is-mobile-device .custom-select-trigger:focus-visible {
      outline: none !important;
      box-shadow: none !important;
      border-color: #ced4da !important;
      background-color: var(--white) !important;
    }

    .custom-select-text {
      /* flex: 1; */
      /* color: #666666 !important; */
      /* color: #736666 !important; */
      /* color: #ffffff !important; */
      /* font-size: 13.5px !important; */
    }

    @media (max-width: 767px) and (hover: hover) and (pointer: fine) {
        .custom-select-trigger {
            /* font-size: 12px !important; */
        }
    }



    /* When month is selected, make text black - with higher specificity */
    .custom-select.has-value .custom-select-text,
    .custom-select-options .custom-select-trigger.selected .custom-select-text,
    .custom-select[data-selected="true"] .custom-select-text {
      /* border: 1px solid #ced4da !important; */
      font-weight: 600;
      color: #000000;
      /* border: 1px solid #ced4da !important; */
      font-weight: 450;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      line-height: 0;
      -webkit-font-smoothing: antialiased;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      /* color: #ffee65 !important; */
      /* FONT-WEIGHT: 500; */
      font-size: 14.5px !important;
      line-height: 0;
      -webkit-font-smoothing: antialiased;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      transform: none !important;
      transition: none !important;
      width: 100%;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px !important;
      font-size: 14.5px !important;
    }


    .custom-select-arrow {
      width: 16px;
      height: 16px;
      margin-left: -1px;
    }

    /* Default open state - arrow points down (towards dropdown below) */
    .custom-select.open .custom-select-arrow {
      transform: rotate(0deg);
    }

    /* When dropdown opens upward, arrow should point up (towards dropdown above) */
    .custom-select.open-upward .custom-select-arrow {
      transform: rotate(180deg) !important;
    }

    .custom-select-arrow svg {
      width: 16px;
      height: 16px;
      margin-left: -1px;
      transform: none !important;
      transition: none !important;
      color: #000 !important;
      /* transform: none !important; */
      /* transition: none !important; */
      transform-origin: left;
      position: absolute;
      overflow-clip-margin: content-box;
      stroke: #ffe400;
      stroke-width: 3px;
      stroke-linecap: square;
      stroke-linejoin: revert-layer;
      transform-origin: 3px 8px;
    }

    .custom-select-options {
      /* position: absolute; */
      /* top: 100%; */
      /* left: auto; */
      /* width: 100%; */
      /* background-color: var(--white); */
      /* border: 1px solid #7b94c5; */
      /* border-top: none; */
      /* border-radius: 0 0 4px 4px; */
      /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
      /* display: none; */
      /* z-index: 9999; */
      /* max-height: 300px !IMPORTANT; */
      /* overflow-y: auto; */
      /* margin: auto; */
      /* width: -webkit-fill-available; */
      /* transition: none; */
      /* Smooth transition for position changes */
      /* font-size: 14.5px; */
      /* overflow-y: auto !important; */
      /* position: absolute; */
      /* top: 100%; */
      /* left: auto; */
      /* width: -webkit-fill-available; */
      /* background-color: var(--white); */
      /* border: 2px solid var(--primary-blue); */
      /* border-top: none; */
      /* display: none; */
      /* z-index: 9999; */
      /* max-height: 100%; */
      /* overflow-y: auto; */
      /* margin: auto; */
      /* width: -webkit-fill-available; */
      /* transition: none; */
    }

    .custom-select.open .custom-select-options {
      /* display: block; */
    }

    .custom-select.open .custom-select-trigger {
      border-radius: 8px 8px 0 0;
      border-color: var(--primary-blue);
    }



    .custom-select.open-upward .custom-select-trigger {
      border-radius: 0 0 8px 8px !important;
    }
    .custom-option {
	padding: 10px 16px;
	padding: 7px 13px;
	font-size: 15px;
	font-size: 13px;
	font-family: 'Poppins', sans-serif;
	color: var(--text-dark);
	cursor: pointer;
	line-height: 1.25;
	padding-left: 7px;
	background-color: #ffffff;
	color: var(--text-dark);
	}



@media (max-width:967px) {
    .custom-option {

font-size: 12.5px;

}}

  
@media (max-width:567px) {
    .custom-option {

      font-size: 12px;

    }}




@media (max-width:400px) {
    .custom-option {

      font-size: 11.5px;

    }}


    .custom-option:hover {
      background-color: #f8faff;
      background-color: #ebebeb;
      color: #000;
      font-weight: 600;
      letter-spacing: -0.018rem;
    }

    .custom-option.highlighted {
      background-color: #c2d4ff;
      color: #000;
      font-weight: 600;
      letter-spacing: -0.018rem;
    }

    .custom-option:first-child {
      /* color: var(--text-light); */
      /* font-style: italic; */
      /* border-top-left-radius: inherit; */
      /* border-top-right-radius: inherit; */
    }

    .custom-option.selected {
      background-color: var(--light-blue);
      color: var(--primary-blue);
      font-weight: 600;
      letter-spacing: -0.018rem;
    }

    .custom-option:first-child {
      border-radius: 0 0 8px 8px;
      border-radius: 0 0 0px 0px;

    }

    /* Scrollbar for dropdown options */
    .custom-select-options::-webkit-scrollbar {
      width: 6px;
    }

    .custom-select-options::-webkit-scrollbar-track {
      background: #f1f1f1;
    }

    .custom-select-options::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      /* border-radius: 3px; */
    }

    .custom-select-options::-webkit-scrollbar-thumb:hover {
      background: #a1a1a1;
    }

    /* Mobile optimizations - Half-screen approach */
    @media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {


      .custom-option {/* line-height: 0; */}

      /* Remove tap highlights and focus outlines on mobile */
      * {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
      }

      /* Allow text selection in inputs and textareas */
      input,
      textarea {
        -webkit-user-select: text !important;
        user-select: text !important;
      }

      /* Add backdrop overlay - optimized for performance */
      .custom-select.open::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 9998;
        /* Remove backdrop-filter to improve performance */
        will-change: opacity;
        transform: translateZ(0);
        /* Hardware acceleration */
      }


      .custom-select-options {
        /* position: fixed !important; */
        /* top: auto; */
        left: 0 !important;
        /* width: 100vw !important; */
        /* height: 75vh !important; */
        /* max-height: 75vh !important; */
        background-color: var(--white);
        /* border: none !important; */
        border-top: 3px solid var(--primary-blue) !important;
        /* border-radius: 20px 20px 0 0 !important; */
        z-index: 9999;
        padding-top: 32px;
        padding-bottom: 40px;
        /* Increased bottom padding for better scrolling */
        padding-right: 0px;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
        /* overflow-y: auto !important; */
        /* overscroll-behavior: contain !important; */
        /* Prevent scroll chaining to background */
        /* scroll-behavior: smooth !important; */
        /* Smooth scrolling within dropdown */
        -webkit-overflow-scrolling: touch !important;
        /* Enable momentum scrolling on iOS */
        scroll-snap-type: none !important;
        /* Disable scroll snapping for smooth experience */
        /* border-top-left-radius: 0px !important; */
        /* border-top-right-radius: 0px !important; */
      }



      .custom-option {padding: 18px 16px;font-size: 18px;border-bottom: 1px solid #f0f0f0;min-height: auto;display: flex;align-items: center;}

      .custom-option:first-child {
        /* margin-top: -25px; */
        /* padding-top: 20px; */
        border-top-left-radius: 0 !important;
        border-top-right-radius: 0 !important;
      }

      .custom-select-trigger {
        padding: 14px 16px;
        /* font-size: 16px; */
        /* min-height: 48px; */
        /* min-height: 35px; */
        PADDING: 9px 6.5px !important;
        padding-left: 5.5px !important;
        /* font-size: unset !important; */
      }

      /* Universal Mobile header for all custom dropdowns */
      .custom-select-options::before {
        display: none !important;
        content: none !important;
      }


      /* Close button */
      .custom-select-close-btn {
        position: fixed;
        /* top: calc(30% + 10px); */
        right: 20px;
        color: white;
        font-size: 24px;
        font-weight: bold;
        z-index: 10001;
        cursor: pointer;
        background: none;
        border: none;
        padding: 5px;
        /* line-height: 1; */
      }

      /* open-upward on touch: header at bottom-sheet position */\n      .custom-select.open-upward .custom-select-options::before {\n        top: 26% !important;\n        border-radius: 20px 20px 0 0 !important;\n      }\n\n      .custom-select.open-upward .custom-select-close-btn {\n        top: calc(25% + 10px) !important;\n      }
    }

    /* Additional mobile targeting using JavaScript-detected mobile class */
    body.is-mobile-device * {
      -webkit-tap-highlight-color: transparent !important;
      -webkit-touch-callout: none !important;
      -webkit-user-select: none !important;
      user-select: none !important;
    }

    /* Allow text selection in inputs and textareas */
    body.is-mobile-device input,
    body.is-mobile-device textarea {
      -webkit-user-select: text !important;
      user-select: text !important;
    }

    body.is-mobile-device .custom-select-options {
      position: fixed !important;
      top: 28% !important;
      left: 0 !important;
      width: 100vw !important;
      height: 75vh !important;
      max-height: 75vh !important;
      background-color: var(--white);
      border: none !important;
      border-radius: 20px 20px 0 0 !important;
      z-index: 9999;
      padding-top: 0 !important;        /* header is in-flow — no spacer needed */
      padding-right: 10px;
      box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
      overflow-y: auto !important;
      overscroll-behavior: contain !important;
      /* Prevent scroll chaining to background */
      scroll-behavior: smooth !important;
      /* Smooth scrolling within dropdown */
      padding-bottom: 80px !important;
    }

    body.is-mobile-device .custom-select.open-upward .custom-select-options {
      /* open-upward on touch = regular bottom-sheet */
      position: fixed !important;
      top: 33% !important;
      bottom: auto !important;
      height: 75vh !important;
      border-top: 3px solid var(--primary-blue) !important;
      border-bottom: none !important;
      border-radius: 20px 20px 0 0 !important;
      box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
      padding-top: 26px !important;
      padding-bottom: 40px !important;
      padding-right: 0px;
      overscroll-behavior: contain !important;
      /* Prevent scroll chaining to background */
      scroll-behavior: smooth !important;
      /* Smooth scrolling within dropdown */
      -webkit-overflow-scrolling: touch !important;
      /* Enable momentum scrolling on iOS */
      scroll-snap-type: none !important;
      /* Disable scroll snapping for smooth experience */
    }

    body.is-mobile-device .custom-option {
      padding: 20px 16px;
      font-size: 18px;
      border-bottom: 1px solid #f0f0f0;
    }

    body.is-mobile-device .custom-option:first-child {
      margin-top: -5px;
      /* padding-top: 0px; */
    }



    /* Fallback for smaller desktop screens */
    @media (max-width: 1024px) and (hover: hover) and (pointer: fine) {
      body.is-mobile-device .new-dropdown-trigger {
        /* padding: 14px 16px; */
        font-size: 16px;
        padding: 14px 16px;
        font-size: 16px;
        padding: 10px 6px;
        font-size: 13px !important;
        padding-top: 9px;
        padding-bottom: 9px;

      }
    }


    /* Ensure desktop behavior is maintained */
    body.is-desktop-device .custom-select-options {
      /* position: absolute; */
      /* max-height: 110vw; */
      top: 100% !important;
      top: auto;
      bottom: auto !important;
      border-top: 0px solid var(--primary-blue);
      /* border-bottom: none; */
      /* top: auto; */
      /* bottom: 100%; */
      border-top: 0px solid var(--primary-blue);
      border-bottom: none;
      /* position: absolute; */
      /* max-height: 300px; */
      /* top: 100%; */
      left: auto;
    
: 100%;
      background-color: var(--white);
      border: 2px solid var(--primary-blue);
      border-top: none;
      display: none;
      z-index: 9999;
      /* max-height: 300px; */
      /* border: 2px solid var(--primary-blue); */
      /* overflow-y: overlay; */
      /* margin: auto; */
      /* width: -webkit-fill-available; */
      /* transition: none; */
      /* border-radius: 0 0 4px 4px; */
      /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
      display: flex;
      align-items: center;
      justify-content: space-between;
      -webkit-transition: none !important;
      -webkit-transform: none !important;
      width: 100%;
      /* border-radius: 8px; */
      cursor: pointer;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      overflow-wrap: break-word;
      word-break: break-word;
      -webkit-font-smoothing: antialiased;
      backface-visibility: hidden;
      image-rendering: auto;
      top: auto;
      bottom: 100%;
      /* border-bottom: 2px solid var(--primary-blue) !important; */
      /* border-bottom: none; */
      border-radius: 0 0 3px 8px;
      /* max-height: 300px; */
      overflow-y: auto;
      margin: auto;
      width: -webkit-fill-available;
      transition: all 0.15s ease-in-out;
      border-radius: 0 0 4px 4px;
      background-color: var(--white);
      border: 2px solid var(--primary-blue);
      /* outline: 0px; */
      vertical-align: baseline;
      background: transparent;
      margin: 0px;
      padding: 0px;
      filter: none !important;
      max-height: 300px;
      overflow-y: auto;
      position: absolute;
      top: 100%;
      left: auto;
      width: 100%;
      background-color: transparent !important;
      border: 2px solid var(--primary-blue);
      border-top: none;
      border-radius: 0 0 4px 4px;
      /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
      display: none;
      z-index: 9999;
      max-height: 300px;
      overflow-y: auto;
      margin: auto;
      width: -webkit-fill-available;
      transition: all 0.15s ease-in-out;
    }

    /* Fallback for smaller desktop screens */
    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {
      .custom-select-options {
        max-height: 250px;
        position: absolute;
      }

      /* Allow upward positioning on small desktop screens */
      .custom-select.open-upward .custom-select-options {
        position: absolute !important;
        top: auto !important;
        bottom: 100% !important;
        border-top: 2px solid var(--primary-blue) !important;
        border-bottom: none !important;
        border-radius: 8px 8px 0 0 !important;
        max-height: 250px;
      }

      .custom-option {
        padding: -1px 3px;
        font-size: 13.5px;
        font-size: 12.5px;
        padding: 10px 9px;
        font-size: 14px;
        padding: 10px 6px;
        font-size: 13px;
        font-size: 12.5px;
        padding-top: 7px;
        padding-bottom: 7px;
      }

      .custom-select-trigger {
        padding-left: 8px !important;
        padding-right: 5px !important;
      }
    }




    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

      .mediz-body .custom-select-trigger.selected,
      .mediz-body .custom-select.has-value .custom-select-trigger {
        /* border: 0px solid #274c93 !important; */
        /* padding-top: 10px !important; */
        /* padding-bottom: 11px !important; */
        /* font-size: 14px !important; */
        /* padding: 11.5px !important; */
        /* border-color: #dc3545 !important; */
        /* border-width: 1px !important; */
        /* border: 1px solid rgb(220, 53, 69) !important; */
        /* border: 1px solid rgb(185 22 37) !important; */
        /* box-shadow: inset 0 0 20px 13px #ff7a7a3d !important; */
        /* background: radial-gradient(circle, rgb(12 21 38) 0%, rgb(11 68 185) 0%, rgb(16 30 90) 100%) !important; */
        padding-left: 10px !important;
        padding-right: 5px !important;
      }
    }





    /* Fallback for smaller desktop screens */
    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

      .mediz-body .custom-select-trigger.selected,
      .mediz-body .custom-select.has-value .custom-select-trigger {
        /* padding: 10px 9px; */
        /* font-size: 14px; */
        /* padding: 10px 6px; */
        /* font-size: 13px; */
        /* font-size: 11px; */
        /* padding-top: 9px; */
        /* padding-bottom: 9px; */
        /* padding-left: 10px !important; */
        /* padding-right: 5px !important; */
        /* padding-left: 10px !important; */
        /* padding-right: 5px !important; */
        /* padding-left: 10px !important; */
        /* padding-right: 5px !important; */
        /* font-size: 12.5px !important; */
        /* padding-left: 10px !important; */
        /* padding-right: 5px !important; */
        padding-left: 10px !important;
        padding-right: 5px !important;
      }


      .custom-option {
        padding: 4px 3px;
        font-size: 11px;
      }



    }

    /* Textarea */
    .textarea-group textarea {
      width: 100%;
      min-height: 100px;
      padding: 10px 16px;
      border: 2px solid var(--border-light);
      border-radius: 8px;
      font-size: 15px;
      font-family: 'Poppins', sans-serif;
      resize: vertical;
      transition: border-color 0.2s ease;
      transition: none !important;
      -webkit-transition: none !important;
    }

    .textarea-group textarea:focus {
      outline: none;
      border-color: var(--primary-blue);
    }

    /* Info box */
    .info-box {
      background: #e8f4fd;
      border: 1px solid #b3d9f7;
      border-radius: 8px;
      padding: 20px;
      margin: 25px 0;
    }

    .info-box h4 {
      margin: 0 0 10px 0;
      color: var(--primary-blue);
      font-size: 16px;
      font-weight: 600;
    }

    .info-box p {
      margin: 5px 0;
      font-size: 14px;
      color: var(--text-dark);
      line-height: 1.7;
    }

    .phone-highlight {
      font-weight: 600;
      color: var(--primary-blue);
    }

    /* Checkbox */
    .checkbox-group {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 16px;
      border: 2px solid var(--border-light);
      border-radius: 8px;
      margin: 20px 0;
      cursor: pointer;
      transition: all 0.2s ease;
      user-select: none;
      /* Prevent text selection when clicking */
      transition: none !important;
      -webkit-transition: none !important;
    }

    .checkbox-group:hover {
      border-color: var(--primary-blue);
      background-color: #f8faff;
      /* transform: translateY(-1px); */
      box-shadow: 0 2px 8px rgba(23, 68, 158, 0.1);
    }

    .checkbox-group input[type="checkbox"] {
      width: 18px;
      height: 18px;
      accent-color: var(--primary-blue);
      margin-top: 2px;
      cursor: pointer;
    }

    .checkbox-group label {
      margin: 0;
      font-size: 14px;
      line-height: 1.7;
      cursor: pointer;
      flex: 1;
    }


    /* Submit button */
    .submit-container {
      text-align: center;
      padding-top: 20px;
      border-top: 1px solid var(--border-light);
      gap: 15px;
      flex-wrap: wrap;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 30px;
    }


    .submit-btn {
    transition: none !important;
    -webkit-transition: none !important;
    opacity: 1;
    background: linear-gradient(183deg, rgb(18 104 186) 0%, rgb(0 66 166) 100%);
    color: #ffdec1;
    box-shadow: 0px 1px 0px 1px #ffffff !important;
    -webkit-box-shadow: 0px 1px 0px 1px #ffffff !important;
    background-color: #000000 !important;
    margin: 0px;
    flex: 1;
    min-width: 200px;
    padding: 15px 25px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    outline-color: #003b83;
    background: linear-gradient(185deg, rgb(255, 237, 85) 0%, rgb(229, 201, 0) 100%) rgb(254, 223, 1);
    color: rgb(37, 37, 37) !important;
    letter-spacing: 0.011rem !important;
    cursor: pointer;
    border: 1px solid rgb(124 124 124 / 30%);
    font-family: 'Poppins', sans-serif;
    }

    .submit-btn:hover {
      /* white-space: pre; */
      background-color: #000000 !important;
      background: linear-gradient(185deg, rgb(255, 246, 168) 0%, rgb(229, 201, 0) 100%) rgb(254, 223, 1);
    }

    .submit-btn:active {
      transform: translateY(0);
    }

    /* Error messages */
    .error-message {
      color: #e74c3c;
      font-size: 14px !important;
      margin-top: 4px !important;
      font-weight: 500;
      display: block;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem !important;
      line-height: 1.41;
      -webkit-font-smoothing: antialiased;
      padding-left: 7px;
    }

    @media (max-width: 410px) {
      .error-message {
        color: #e74c3c;
        font-size: 12.5px !important;
        margin-top: 5px;
        font-weight: 500;
        display: block;
      }
    }

    .form-group.has-error .error-message {
      display: block;
    }

    /* Default input styling with grey border-left - applied to input-group containers like login.html */
    .form-group:not(.field-error):not(.field-valid) .input-group,
    .form-group:not(.field-error):not(.field-valid) .health-card-input-group,
    .form-group:not(.field-error):not(.field-valid) .custom-select,
    .medication-field:not(.field-error):not(.field-valid),
    .allergy-field:not(.field-error):not(.field-valid) {
      /* border-left: 4px solid #535353 !important; */
      padding-left: 7px !important;
      border-left: 4px solid #b6b6b6;
    }




    @media (max-width: 1024px) {

      .form-group:not(.field-error):not(.field-valid) .input-group,
      .form-group:not(.field-error):not(.field-valid) .health-card-input-group,
      .form-group:not(.field-error):not(.field-valid) .custom-select,
      .medication-field:not(.field-error):not(.field-valid),
      .allergy-field:not(.field-error):not(.field-valid) {
        padding-left: 4px !important;
      }

    }


    /* Validation border states - override default grey */
    .form-group.field-error .input-group,
    .form-group.field-error .health-card-input-group,
    .form-group.field-error .custom-select {
      border-left: 4px solid #e74c3c !important;
      padding-left: 4px !important;
      padding-left: 7px !important;
    }


    @media (max-width: 1024px) {

      .form-group.field-error .input-group,
      .form-group.field-error .health-card-input-group,
      .form-group.field-error .custom-select {
        padding-left: 4px !important;
      }
    }

    .form-group.field-valid .input-group,
    .form-group.field-valid .health-card-input-group,
    .form-group.field-valid .custom-select {
      border-left: 4px solid #17449e !important;
      padding-left: 7px !important;
    }

    @media (max-width: 1024px) {

      .form-group.field-valid .input-group,
      .form-group.field-valid .health-card-input-group,
      .form-group.field-valid .custom-select {
        /* border-left: 4px solid #17449e !important; */
        padding-left: 4px !important;
      }

    }


    /* Remove the old pseudo-element approach */
    .form-group.field-error::after,
    .form-group.field-valid::after {
      display: none;
    }

    /* Special form elements styling - only apply if no validation state */
    .form-group:not(.field-error):not(.field-valid) .health-card-selection,
    .form-group:not(.field-error):not(.field-valid) .radio-group,
    .form-group:not(.field-error):not(.field-valid) .checkbox-group {
      /* border-left: 4px solid #535353 !important; */
      padding-left: 7px !important;
      border-left: 4px solid #b6b6b6;
    }

    @media (max-width: 1024px) {

      .form-group:not(.field-error):not(.field-valid) .health-card-selection,
      .form-group:not(.field-error):not(.field-valid) .radio-group,
      .form-group:not(.field-error):not(.field-valid) .checkbox-group {
        /* border-left: 4px solid #17449e !important; */
        padding-left: 7px !important;
      }

    }

    .form-group.field-error .health-card-selection,
    .form-group.field-error .radio-group,
    .form-group.field-error .checkbox-group {
      border-left: 4px solid #e74c3c !important;
      padding-left: 7px !important;
    }

    /* Special styling for health card selection with errors */
    /* Create a wrapper for health card content (radio buttons + error) with border-left */
    .form-group.field-error[data-field-id="health_card_selection"] .health-card-content-wrapper {
      border-left: 4px solid #e74c3c !important;
      padding-left: 8px !important;
      border-radius: 4px;
    }

    /* Remove border from inner health-card-selection when it's inside the wrapper */
    .form-group.field-error[data-field-id="health_card_selection"] .health-card-content-wrapper .health-card-selection {
      border-left: none !important;
      padding-left: 0 !important;
    }

    /* Remove the form-group level border for health card selection */
    .form-group.field-error[data-field-id="health_card_selection"] {
      border-left: none !important;
      padding-left: 0 !important;
    }

    .form-group.field-valid .health-card-selection,
    .form-group.field-valid .radio-group,
    .form-group.field-valid .checkbox-group {
      border-left: 4px solid #17449e !important;
      padding-left: 8px !important;
    }

    /* Ensure form-groups are positioned relatively for absolute positioning of ::after */
    .form-group {
      position: relative;
    }

    /* Health Card Form Styles */
    .health-card-selection {
      display: flex;
      gap: 15px;
      margin-bottom: 20px;
    }

    .health-card-option {
      flex: 1;
      border: 1px solid #ced4da;
      border-radius: 8px;
      padding: 15px;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
    }

    .health-card-option:hover {
      border-color: #17449e;
      background-color: #f8f9ff;
    }

    .health-card-option input[type="radio"] {
      margin-right: 10px;
      accent-color: #17449e;
      transform: scale(1.2);
    }

    .health-card-option label {
      margin: 0;
      cursor: pointer;
      font-weight: 500;
      color: #3c4a73;
    }


    /* ========================================
   NON-CUSTOM INPUT - DEFAULT STATE
   ======================================== */
    #patientIntakeForm input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
    #patientIntakeForm textarea,
    #patientIntakeForm select:not(.custom-select) {
      width: 100%;
      padding: 10px;
      border: 1px solid #ced4da;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 500;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      letter-spacing: -0.00766rem;
      color: #000000;
      cursor: text;
      box-shadow: inset 0 0 20px 13px #c8c8c854;
      background: white;
      /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif; */
    }

    /* ÃƒÂ¢Ã…â€œÃ¢â‚¬Â¦ Inputmask placeholder color - controls the underscore characters */
    /* JavaScript manages color dynamically based on actual user input */
    #phone_number,
    #emergency_contact_phone {
    /* color: #666666 !important; */
    /* color: #666666 !important; */
    /* font-size: 14px !important; */
    }


    /* ========================================
   NON-CUSTOM INPUT - FOCUS STATE (default)
   ======================================== */
    #patientIntakeForm input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus,
    #patientIntakeForm textarea:focus,
    #patientIntakeForm select:not(.custom-select):focus {
      box-shadow: 0 0 0 3px #2c55a3, inset 0 0 20px 13px #ffffff00 !important;
      outline: 2px solid #1b3d96 !important;
      background: #ffffff !important;
      /* color: #000000 !important; */
      border-width: 2px !important;
      border-color: rgb(23, 68, 158);
    }



    /* ========================================
   NON-CUSTOM INPUT - ERROR STATE
   ======================================== */
    .form-group.field-error input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
    .form-group.field-error textarea,
    .form-group.field-error select:not(.custom-select),
    .form-group.has-error input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
    .form-group.has-error textarea,
    .form-group.has-error select:not(.custom-select) {
      border: 2px solid rgb(220, 53, 69);
      outline: 1px !important;
      border: 2px solid rgb(220, 53, 69);
      box-shadow: rgba(191, 4, 4, 0.04) 0px 0px 17px 9px inset !important;
      background: white !important;
      border-color: rgb(220, 53, 69) !important;
      border-width: 2px !important;
    }

    /* ========================================
   NON-CUSTOM INPUT - ERROR STATE + FOCUS
   ======================================== */
    .form-group.field-error input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus,
    .form-group.field-error textarea:focus,
    .form-group.has-error input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus,
    .form-group.has-error textarea:focus {
      border: 2px solid rgb(220, 53, 69) !important;
      border-color: rgb(220, 53, 69) !important;
      box-shadow: 0 0 0 3px #2c55a3, inset 0 0 20px 13px #ffffff00 !important;
      background: #ffffff !important;
      color: #000000 !important;
    }

    /* ========================================
   NON-CUSTOM INPUT - VALID STATE (while focused)
   ======================================== */
    .form-group.field-valid input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus,
    .form-group.field-valid textarea:focus {
      background: #ffffff !important;
      border: 2px solid rgb(23, 68, 158) !important;
      box-shadow: 0 0 0 3px #113477 !important;
      outline: 2px solid #1b3d96 !important;
      color: #000000 !important;
    }

    /* ========================================
   NON-CUSTOM INPUT - VALID STATE (after blur)
   ======================================== */
    .form-group.field-valid input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not(:focus),
    .form-group.field-valid textarea:not(:focus),
    .form-group.field-valid select:not(.custom-select):not(:focus) {
      color: rgb(255, 231, 29) !important;
      color: rgb(0 0 0) !important;
      border: 2px solid rgb(23, 68, 158) !important;
      box-shadow: rgb(239 245 255 / 87%) 0px 0px 20px 15px inset !important;
      color: #333333 !important;
    }

    /* ========================================
   DOB INDIVIDUAL INPUT-GROUP (day + year)
   Standalone .input-group can carry field-valid/field-error
   directly since they are not inside a form-group themselves
   ======================================== */
    .input-group.field-valid {
      border-left: 4px solid #17449e !important;
      padding-left: 4px !important;
    }

    .input-group.field-error {
      border-left: 4px solid #e74c3c !important;
      padding-left: 7px !important;
    }

    @media (max-width: 1024px) {
      .input-group.field-valid,
      .input-group.field-error {
        padding-left: 4px !important;
      }
    }

    /* Valid blurred */
    .input-group.field-valid input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):not(:focus) {
      border: 2px solid rgb(23, 68, 158) !important;
      box-shadow: rgb(239 245 255 / 87%) 0px 0px 20px 15px inset !important;
      color: #333333 !important;
    }

    /* Valid focused */
    .input-group.field-valid input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus {
      background: #ffffff !important;
      border: 2px solid rgb(23, 68, 158) !important;
      box-shadow: 0 0 0 3px #113477 !important;
      outline: 2px solid #1b3d96 !important;
      color: #000000 !important;
    }

    /* Error any state */
    .input-group.field-error input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]) {
      border: 2px solid rgb(220, 53, 69) !important;
      box-shadow: rgba(191, 4, 4, 0.04) 0px 0px 17px 9px inset !important;
      background: white !important;
    }

    /* Error focused */
    .input-group.field-error input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus {
      border: 2px solid rgb(220, 53, 69) !important;
      box-shadow: 0 0 0 3px #2c55a3, inset 0 0 20px 13px #ffffff00 !important;
      background: #ffffff !important;
      color: #000000 !important;
    }

    /* ========================================
   MOBILE RESPONSIVE - INPUT FIELDS
   ======================================== */
    @media (max-width: 768px) {

      #patientIntakeForm input:not(.custom-select-trigger):not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
      #patientIntakeForm textarea,
      #patientIntakeForm select:not(.custom-select) {
        font-size: 13px;
        padding: 8px;
      }

      /* ÃƒÂ¢Ã…â€œÃ¢â‚¬Â¦ Phone fields - prevent Inputmask font-size FOUC on mobile */
      #phone_number,
      #emergency_contact_phone {
        font-size: 13px !important;
      }
    }

    /* ========================================
   CUSTOM DROPDOWN FOCUS STATE
   ======================================== */
    .mediz-body .custom-select.focus {
      box-shadow: 0 0 0 3px #274c93;
      outline: 2px solid transparent;
    }

    /* ========================================
   NONE OPTION BUTTON - DEFAULT STATE
   ======================================== */
    .none-option-btn {/* box-shadow: none; *//* border-color: #000000 !important; *//* border-style: double; *//* justify-content: center; *//* border-radius: 8px; *//* width: 100%; *//* padding: 14px; *//* font-size: 14px; *//* cursor: pointer; *//* font-weight: 500; *//* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif !important; *//* background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important; *//* color: rgb(255, 255, 255) !important; *//* letter-spacing: -0.00766rem !important; *//* transition: none !important; *//* transform: none !important; *//* -webkit-transition: none !important; *//* -webkit-transform: none !important; *//* justify-content: center; *//* align-items: center; *//* padding-top: 11px; *//* padding-bottom: 11px; *//* margin-top: -1px; *//* border-radius: 10px; *//* background-color: #000 !important; */box-shadow: none;border-color: #000000 !important;border-style: double;justify-content: flex-start;border-radius: 8px;width: 100%;padding: 13px;font-size: 14px;cursor: pointer;font-weight: 500;font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif !important;background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;color: rgb(255, 255, 255) !important;letter-spacing: -0.00766rem !important;transition: none !important;transform: none !important;-webkit-transition: none !important;-webkit-transform: none !important;justify-content: center;padding-top: -83px;padding-bottom: 11px;margin-top: -9px;border-radius: 10px;background-color: #000 !important;height: auto;min-height: auto;flex: 1;display: inline-flex;align-content: flex-end;align-items: center;}

    /* ========================================
   NONE OPTION BUTTON - HOVER STATE
   ======================================== */
    .none-option-btn:hover {
    border-color: #17449e;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(23, 68, 158, 0.15);
    }

    /* ========================================
   NONE OPTION BUTTON - ACTIVE/SELECTED STATE
   ======================================== */
    .none-option-btn.selected, .none-active .none-option-btn {
     border: 3px solid #ffffff !important;
     background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
     outline: 0 !important;
     box-shadow: 0px 1px 0px 2px #182c52 !important;
     box-shadow: 0px 1px 0px 4px #001354 !important;
     box-shadow: 0px 1px 0px 3px rgb(0 20 81) !important;
    }

    /* Pseudo-disabled field styling (looks disabled but is actually clickable) */
    /* Fields are styled via inline JavaScript, not CSS disabled attribute */

    @media (max-width: 500px) {
      .none-option-btn {
      }
    }

    /* ========================================
   DYNAMIC ADD FIELD BUTTON STYLES
   ======================================== */
    .add-field-btn {
      display: inline-flex;
      align-items: center;
      gap: 1px;
      margin-top: auto;
      padding: 6px 5px;
      padding-left: 0px;
      background: transparent;
      border: 2px solid #123b8c;
      border-radius: 8px;
      color: #17449e;
      font-size: 13px;
      padding-left: 6px !important;
      margin-top: 18px;
      border-radius: 5px;
      margin-left: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0 ease;
      font-family: 'Poppins', sans-serif;
      background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%);
      color: rgb(255, 255, 255);
      font-weight: 600;
      border: 2px solid #123b8c;
      box-shadow: inset 0 0 20px 13px #2b409496 !important;
    }

    .add-field-btn:hover {
      background: #f0f5ff;
      border-color: #0d3a8a;
      color: #0d3a8a;
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(23, 68, 158, 0.15);
      color: var(--daniel-white);
      background: radial-gradient(circle, rgb(35 84 185) 0%, rgb(9 42 191) 100%);
      background: radial-gradient(circle, rgb(56 106 215) 0%, rgb(0 21 116) 100%) !important;
      color: #fff;
      transform: none;
      box-shadow: 0 2px 8px rgba(23, 68, 158, 0.15);
      border-color: #0d3a8a;
    }

    .add-field-btn:active {
      transform: translateY(0);
      box-shadow: none;
    }

    .add-field-btn:focus {
      outline: none;
      transform: none;
    }

    .add-field-btn svg {
      flex-shrink: 0;
      width: 12%;
      color: #f8df0c !important;
    }

    /* Delete Row Button Styles */
    .delete-row-btn {
    /* width: -webkit-fill-available; */
    /* cursor: pointer; */
    /* cursor: pointer; */
    /* width: -webkit-fill-available; */
    /* cursor: pointer; */
    display: flex;
    width: 40px;
    height: 40px;
    background: #fff5f5;
    border-radius: 8px;
    /* cursor: pointer; */
    background: linear-gradient(183deg, rgb(247 247 247) 0%, rgb(218 218 218) 100%);
    color: #202020;
    border: 1px solid #c6c6c6;
    transform: none !important;
    display: inline-flex;
    width: -webkit-fill-available;
    height: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: none !important;
    background: linear-gradient(183deg, rgb(247 247 247) 0%, rgb(218 218 218) 100%);
    color: #202020;
    border: 1px solid #c6c6c6;
    transform: none !important;
    justify-content: center;
    flex: auto;
    align-content: center;
    align-items: center;
    padding-bottom: 6px;
    padding-top: 10px;
    }

    .delete-row-btn:hover {
      background: #ffebee;
      border-color: #ef5350;
      color: #c62828;
      transform: scale(1.05);
      border-color: var(--daniel-primary-blue);
      border-color: rgb(10 10 10 / 25%);
      background: rgb(198 216 255);
      color: rgb(0 0 0);
      background: radial-gradient(circle, rgb(222 222 222) 0px, rgb(101 125 159) 50%, rgb(6 41 103) 100%);
      background: radial-gradient(circle, rgb(222 222 222) 0px, rgb(187 187 187) 50%, rgb(116 116 116) 100%);
      background: linear-gradient(183deg, rgb(255 255 255 / 34%) 0%, rgb(51 88 131 / 13%) 100%);
      background: linear-gradient(183deg, rgb(255 255 255 / 34%) 0%, rgb(51 88 131 / 13%) 100%) !important;
    }

    .delete-row-btn:active {
      transform: scale(0.95);
    }

    .delete-row-btn:focus {
      outline: none;
      box-shadow: 0 0 1px 0px rgb(47 81 211 / 10%);
    }

    .delete-row-btn svg {
      width: 18px;
      height: 18px;
    }

    /* Animation for new rows */
    .medication-row,
    .allergy-row {
      animation: slideInFade 0.3s ease-out;
    }

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

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

    /* Animation for row removal */
    .medication-row.removing,
    .allergy-row.removing {
      animation: slideOutFade 0.25s ease-out forwards;
    }

    @keyframes slideOutFade {
      from {
        opacity: 1;
        transform: translateY(0);
      }

      to {
        opacity: 0;
        transform: translateY(-10px);
      }
    }

    /* Responsive adjustments for add buttons */
    @media (max-width: 768px) {
      .add-field-btn {
        width: auto;
        justify-content: center;
        padding: 3px 7px;
        padding-left: 2px;
        font-size: 11px;
        gap: 2px;
        padding-left: 0px;
        border-radius: 6px;
      }

      .delete-row-btn {
        /* width: -webkit-fill-available; */
        height: 34px;
        display: inline-flex;
        align-items: stretch;
        justify-content: center;
        width: -webkit-fill-available;
      }

      .delete-row-btn svg {
        width: 16px;
        height: 16px;
      }
    }

    /* Hide add buttons when "None" is active */
    #medications-container.none-active #add-medication-btn,
    #allergies-container.none-active #add-allergy-btn {
      display: none;
    }

    /* Override existing custom-select-trigger styles when validated/selected */
    .custom-select-trigger.selected,
    .custom-select.has-value .custom-select-trigger,
    .custom-select.validated .custom-select-trigger {
      /* border: 2px solid #274c93 !important; */
      /* border-color: #274c93 !important; */
      /* box-shadow: 0 0 0 1px #274c93 !important; */
    }

    /* Custom dropdown focus styling to match other form elements */
    #patientIntakeForm .custom-select-trigger:focus {
      /* outline: none; */
    }

    /* Responsive styling for forms below 768px viewport - exclude custom dropdowns */
    @media (max-width: 768px) {

      #patientIntakeForm input:not(.custom-select-trigger),
      #patientIntakeForm textarea,
      #patientIntakeForm select:not(.custom-select) {
        font-size: 13px !important;
        padding: 8px !important;
      }

      /* Target inputs with inline styles specifically, but exclude custom dropdowns */
      #patientIntakeForm input[style*="font-size"]:not(.custom-select-trigger),
      #patientIntakeForm textarea[style*="font-size"],
      #patientIntakeForm select[style*="font-size"]:not(.custom-select) {
        font-size: 13px !important;
      }

      #patientIntakeForm input[style*="padding"]:not(.custom-select-trigger),
      #patientIntakeForm textarea[style*="padding"],
      #patientIntakeForm select[style*="padding"]:not(.custom-select) {
        padding: 8px !important;
      }
    }

    .health-card-input-group {
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .health-card-digits {
      flex: 2;
    }

    .health-card-version {
      flex: 0 0 80px;
      text-transform: uppercase;
    }

    .date-input-group {
      display: flex;
      gap: 10px;
      justify-content: center;
      align-items: center;
    }

    .date-input-group>div {
      flex: 1;
    }

    .form-hint {
      margin-top: 8px;
      font-size: 14px;
      color: #6c757d;
    }

    .form-hint a {
      color: #0056A6;
      text-decoration: none;
    }

    .form-hint a:hover {
      text-decoration: underline;
    }

    .availability-note {
      background: #f8f9fa;
      padding: 15px;
      border-radius: 8px;
      margin-bottom: 20px;
      border-left: 4px solid #17449e;
      font-size: 15px;
    }

    .checkbox-label {
      display: flex;
      align-items: flex-start;
      cursor: pointer;
      line-height: 1.5;
    }

    .checkbox-label input[type="checkbox"] {
      margin-right: 10px;
      margin-top: 4px;
      transform: scale(1.2);
      accent-color: #17449e;
    }

    .back-btn {
    flex: 1;
    width: 100%;
    background-color: #000000 !important;
    background: linear-gradient(183deg, rgb(247 247 247) 0%, rgb(218 218 218) 100%);
    color: #202020;
    box-shadow: 0px 1px 0px 1px #ffffff !important;
    -webkit-box-shadow: 0px 1px 0px 1px #ffffff !important;
    border: 1px solid rgb(128 128 128 / 30%);
    outline-color: #003b83;
    margin: 0px;
    cursor: pointer;
    min-width: 200px;
    padding: 15px 25px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    gap: 0px;
    text-transform: uppercase;
    align-items: baseline;

    }

    .back-btn:hover {
    background: linear-gradient(360deg, rgb(215 215 215) 0%, rgb(239, 239, 239) 100%) !important;
    color: rgb(28, 24, 24) !important;
    background-color: #000000 !important;
    }

    .back-btn i {
      margin-right: 8px;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .tooltip {
      position: relative;
      cursor: help;
    }

    .tooltip:hover::after {
      content: attr(title);
      position: absolute;
      bottom: 125%;
      left: 50%;
      transform: translateX(-50%);
      background: #333;
      color: white;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 12px;
      white-space: nowrap;
      z-index: 1000;
    }

    .tooltip:hover::before {
      content: '';
      position: absolute;
      bottom: 115%;
      left: 50%;
      transform: translateX(-50%);
      border: 5px solid transparent;
      border-top-color: #333;
      z-index: 1000;
    }

    /* Health Card Number Tooltip - Separate Styles */
    .tooltip-health-number {
      position: relative;
      cursor: help;
    }

    .tooltip-health-number:hover::after {
      content: attr(title);
      position: absolute;
      bottom: 125%;
      left: 50%;
      transform: translateX(-50%);
      background: #333;
      color: white;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 12px;
      white-space: nowrap;
      z-index: 1000;
    }

    .tooltip-health-number:hover::before {
      content: '';
      position: absolute;
      bottom: 115%;
      left: 50%;
      transform: translateX(-50%);
      border: 5px solid transparent;
      border-top-color: #333;
      z-index: 1000;
    }

    /* Health Card Version Tooltip - Separate Styles */
    .tooltip-health-version {
      position: relative;
      cursor: help;
    }

    .tooltip-health-version:hover::after {
      content: attr(title);
      position: absolute;
      bottom: 125%;
      left: 50%;
      transform: translateX(-50%);
      background: #333;
      color: white;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 12px;
      white-space: nowrap;
      z-index: 1000;
    }

    .tooltip-health-version:hover::before {
      content: '';
      position: absolute;
      bottom: 115%;
      left: 50%;
      transform: translateX(-50%);
      border: 5px solid transparent;
      border-top-color: #333;
      z-index: 1000;
    }

    /* Responsive adjustments for Health Card Number Tooltip */
    @media (max-width: 1024px) {
      .tooltip-health-number:hover::after {
        left: 80%;
        transform: translateX(-40%);
        font-size: 11px;
        padding: 6px 8px;
        line-height: 1.3;
      }

      @media (max-width: 433px) {
        .tooltip-health-number:hover::after {
          left: 80%;
          transform: translateX(-50%) !important;
          font-size: 10px !important;
          line-height: 1.3;
        }
      }

      .tooltip-health-number:hover::before {
        left: 80%;
        transform: translateX(-51%);
      }
    }

    /* Responsive adjustments for Health Card Version Tooltip */
    @media (max-width: 992px) {
      .tooltip-health-version:hover::after {
        left: 20%;
        transform: translateX(-20%);
        font-size: 10px;
        padding: 6px 8px;
        white-space: normal;
        line-height: 1.3;
      }

      .tooltip-health-version:hover::before {
        left: 20%;
        transform: translateX(-20%);
      }
    }

    @media (max-width: 1024px) {
      .tooltip-health-version:hover::after {
        left: auto;
        transform: translateX(-100%);
        font-size: 11px;
        padding: 5px 7px;
        white-space: pre;
        max-width: unset;
        line-height: 1.2;
      }

      .tooltip-health-version:hover::before {
        left: 10%;
        transform: translateX(-10%);
      }
    }

    /* Responsive adjustments for health card form */
    @media (max-width: 1024px) {
      .health-card-selection {
        flex-direction: column;
        gap: 10px;
      }

      .health-card-input-group {
        flex-direction: column;
        gap: 15px;
      }

      .health-card-digits,
      .health-card-version {
        flex: none;
        width: 100%;
      }

      .submit-container {
        flex-direction: column;
        gap: 15px;
      }

      .submit-container .back-btn {
        order: 2;
      }

      .submit-container .submit-btn {
        order: 1;
        width: 100%;
      }
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .form-container {
        margin: 20px auto;
        padding: 0 15px;
        margin-top: 0px;
        margin-bottom: 0px;
        padding-bottom: 83px;
        padding-top: 68px;
      }

      .form-header {

        padding: 25px 15px;
        padding-bottom: 0px;
        padding-left: 0px;
        padding-right: 0px;

      }

      .form-header h1 {
        font-size: 25px;
      }

      .form-content {
        padding: 30px 20px;
        padding: 30px 6px;
        padding: 20px 20px;
        padding: 20px 9px;
        padding: 20px 8.5px;
      }

      .progress-container {
        padding: 20px;
      }

      .radio-group {
        gap: 10px;
      }

      .radio-option {
        padding: 10px 14px;
      }
    }

    /* Page title section */
    .page-title-section {
  /*on mediz-custom needs to be on form-custom.css after page cleaned/minified/redundant removed/pristined.*/
    background: linear-gradient(to right, rgba(23, 68, 158, 1), rgb(14 27 47));
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    padding-bottom: 50px;
    padding-top: 50px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 0 0 0 rgb(0 0 0 / 0%), 0 1px 12px rgb(165 165 165 / 64%) !important;
      }

    .page-title-section h1 {
      margin: 0;
      font-size: 46px;
      font-weight: 600;
      margin-bottom: 35px;
      font-size: 52px;
    }

    .page-title-section p {
      margin: 0;
      font-size: 18px;
      opacity: 0.9;
    }

    @media (max-width: 1024px) {
      .page-title-section {
        padding: 40px 0 30px;
        padding-bottom: 50px;
        padding-top: 50px;
      }

      .page-title-section h1 {
        font-size: 28px;
        margin-bottom: 15px;
      }

      .page-title-section p {
        font-size: 16px;
      }
    }

    @media (max-width: 395px) {
      .phone-number {
        display: block;
      }
    }

    .mediz-body-outer-wrapper,
    body.mediz-full .mediz-body-wrapper,
    .mediz-header-side-content {
      background-color: #f5f5f5;
    }

    @media (max-width: 410px) {
      .progress-label {
        font-size: 14px;
      }
    }

    /* Close button — hidden by default on ALL devices/viewports.
       Only shown on genuine mobile via JS body class. Never appears on
       desktop dropdowns regardless of viewport width or touch capability. */
    .custom-dropdown-close-btn {
      display: none !important;
    }

    /* Show close button ONLY on true mobile devices */
    body.is-true-mobile-device .custom-dropdown-close-btn,
    body.is-mobile-device .custom-dropdown-close-btn {
      display: flex !important;
      position: fixed !important;
      top: calc(25% + 12px) !important; /* Aligns with top of mobile drawer blue header */
      right: 20px !important;
      color: white !important;
      font-size: 24px !important;
      font-weight: bold !important;
      z-index: 10002 !important;
      cursor: pointer !important;
      background: none !important;
      border: none !important;
      padding: 5px !important;
      width: 44px !important;  /* 44px min touch target */
      height: 44px !important;
      align-items: center !important;
      justify-content: center !important;
      transform: none !important;
      -webkit-transform: none !important;
    }

    body.is-true-mobile-device .custom-dropdown-close-btn:hover,
    body.is-mobile-device .custom-dropdown-close-btn:hover {
      background: rgba(0, 0, 0, 0.25) !important;
      border-radius: 50% !important;
    }

    @media only screen and (max-width: 1024px) and (pointer: coarse) {
      @supports (-webkit-touch-callout: none) {
        .custom-select-options {
          position: fixed !important;
          top: 30% !important;
          left: 0 !important;
          width: 100vw !important;
          height: 70vh !important;
          max-height: 70vh !important;
          background-color: var(--white);
          border: none !important;
          border-radius: 20px 20px 0 0 !important;
          z-index: 9999;
          padding-top: 60px;
          padding-right: 10px;
          box-shadow: 0 -8px 32px rgb(0 0 0 / 30%) !important;
          overflow-y: auto !important;
          overscroll-behavior: contain !important;
          scroll-behavior: smooth !important;
          -webkit-overflow-scrolling: touch !important;
          scroll-snap-type: none !important;
          margin: auto;
        }

        .custom-select-options::before {
          content: attr(data-header-text);
          position: fixed;
          top: 28%;
          left: 0;
          width: 100%;
          padding: 20px;
          background-color: var(--primary-blue);
          color: white;
          font-weight: 600;
          text-align: center;
          z-index: 10000;
        }

        .custom-dropdown-close-btn {
          position: fixed;
          top: 30vh;
          right: 5vw;
          color: white;
          font-size: 6vw;
          font-weight: bold;
          z-index: 10001;
          cursor: pointer;
          background: none;
          border: none;
          padding: 1vw;
          /* Universal transform for consistent centering */
          transform: translateY(-50%);
          -webkit-transform: translateY(-50%);
          /* Ensure visibility on all devices */
          min-width: 44px;
          min-height: 44px;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .marital-status-select-close-btn {
          position: fixed;
          top: 31%;
          right: 20px;
          color: white;
          font-size: 24px;
          font-weight: bold;
          z-index: 10001;
          cursor: pointer;
          background: none;
          border: none;
          padding: 5px;
        }

        body.is-mobile-device .custom-option:first-child {
          margin-top: 5px;
        }

      }
    }

    /* ========================================
   MOBILE HEADER STABILITY FIXES
   ======================================== */

    /* Disable sticky behavior and ensure consistent mobile header positioning */
    @media screen and (max-width: 991px) {

      /* Remove sticky navigation class effects */
      body.mediz-with-sticky-navigation {
        padding-top: 0 !important;
      }

      /* Force mobile header to stay at top - no sticky behavior */
      .mediz-mobile-header-wrap {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: transparent !important;
      }

      .mediz-mobile-header {
        position: relative !important;
        transform: none !important;
        transition: none !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background-color: white !important;
        border-bottom: 1px solid #e1e1e1 !important;
      }

      /* Disable any sticky mobile navigation animations */
      .mediz-sticky-mobile-navigation {
        transform: none !important;
        transition: none !important;
        animation: none !important;
      }

      /* Ensure body has proper top padding for fixed header */
      body {
        overflow-x: hidden;
      }

      /* Prevent header from jumping during dropdown interactions */
      .mediz-mobile-header.dropdown-active {
        position: fixed !important;
        top: 0 !important;
        transform: none !important;
      }

      /* Override any theme-based sticky behavior */
      .mediz-navigation-bar-wrap.mediz-sticky-navigation {
        display: none !important;
        /* Hide desktop sticky nav on mobile */
      }

      /* Ensure mobile header always visible and stable */
      .mediz-mobile-header-container {
        transition: none !important;
        transform: none !important;
      }

      /* Prevent scroll-based header changes */
      .mediz-mobile-header.mediz-fixed-navigation {
        position: fixed !important;
        top: 0 !important;
        transform: none !important;
      }
    }

    /* NEW CLEAN DROPDOWN STYLES - MOBILE ONLY */
    .new-custom-dropdown {
      display: none !important;
      /* Hide by default on desktop */
      position: relative;
      width: 100%;
      cursor: pointer;
      border-left: 4px solid #b6b6b6;
      /* Default grey border */
      padding-left: 4px;
    }

    /* ── Dropdown visibility: 100% JS-class driven ──────────────────────────────
       JS adds body.is-true-mobile-device ONLY on genuine phones/tablets.
       The isDesktopOS check (Windows NT / Macintosh / Linux) in np.html ensures
       touch laptops NEVER receive this class regardless of pointer/hover signals.
       NO CSS media queries — they cannot distinguish a touch laptop from a phone. */
    .custom-select {
      /* display: block !important; */
    }

    .new-custom-dropdown {
      display: none !important;
    }

    body.is-true-mobile-device .custom-select {
      display: none !important;
    }

    body.is-true-mobile-device .new-custom-dropdown {
      display: block !important;
    }

    /* Valid state - blue border on container */
    .form-group.field-valid .new-custom-dropdown {
      border-left: 4px solid #17449e !important;
      padding-left: 12px;
      padding-left: 4px;
      padding-left: 4px !important;
    }

    .form-group.field-valid .new-custom-dropdown .new-dropdown-trigger {
      border: 2px solid #17449e !important;
      background: radial-gradient(circle, rgb(61 122 249) 0%, rgb(0, 22, 120) 100%) !important;
      box-shadow: rgba(21, 57, 130, 0.87) 0px 0px 20px 15px inset !important;
      color: rgb(255, 255, 255) !important;
      letter-spacing: -0.00766rem !important;
      transition: none !important;
      transform: none !important;
      padding: 9px 5px !important;
    }

    /* Error state - red border on container AND trigger */
    .form-group.field-error .new-custom-dropdown {
      border-left: 4px solid rgb(231, 76, 60) !important;
      padding-left: 12px;
    }

    .form-group.field-error .new-custom-dropdown .new-dropdown-trigger {
      border: 2px solid rgb(220, 53, 69) !important;
    }

    /* Also handle the case where the dropdown itself gets the error class */
    .new-custom-dropdown.field-error {
      border-left: 4px solid rgb(231, 76, 60) !important;
      padding-left: 12px;
    }

    .new-custom-dropdown.field-error .new-dropdown-trigger {
      border: 2px solid rgb(220, 53, 69) !important;
    }

    /* Mobile-specific error styling with high specificity */
    .form-group.field-error .new-custom-dropdown {
      border-left: 4px solid #dc3545 !important;
    }

    .form-group.field-error .new-custom-dropdown .new-dropdown-trigger {
      border: 2px solid #dc3545 !important;
    }

    /* Additional mobile error states for direct dropdown targeting */
    .new-custom-dropdown.field-error {
      border-left: 4px solid #dc3545 !important;
    }

    .new-custom-dropdown.field-error .new-dropdown-trigger {
      border: 2px solid #dc3545 !important;
      color: #ffffff !important; /* ÃƒÂ¢Ã…â€œÃ¢â‚¬Â¦ White text in error state for visibility */
    }

    /* Media query specific error styling */
    @media screen and (max-width: 400px) and (hover: none) and (pointer: coarse),
    screen and (max-device-width: 400px),
    screen and (max-width: 400px) {
      body.is-mobile-device .form-group.field-error .new-custom-dropdown {
        border-left-color: #dc3545 !important;
      }

      body.is-mobile-device .form-group.field-error .new-custom-dropdown .new-dropdown-trigger {
        border-color: #dc3545 !important;
      }
    }

    /* Mobile trigger matches desktop visual style (blue gradient) */
    .new-dropdown-trigger {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      border-radius: 8px;
      cursor: pointer;
      border: 2px solid #17449e;
      border-width: 2px;
      background: radial-gradient(circle, rgb(61 122 249) 0%, rgb(0, 22, 120) 100%);
      box-shadow: rgba(21, 57, 130, 0.87) 0px 0px 20px 15px inset;
      color: rgb(255, 255, 255);
      font-size: 14.5px;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
      font-weight: 500;
      letter-spacing: -0.00766rem;
      padding: 9px 8px;
      transition: none;
      transform: none;
      -webkit-font-smoothing: antialiased;
      overflow-wrap: break-word;
      word-break: break-word;
    }

    /* Selected state — border highlight; gradient base already provides the blue look */
    .new-custom-dropdown.selected .new-dropdown-trigger,
    .new-dropdown-trigger.has-value,
    .new-dropdown-trigger[data-selected="true"] {
      border-color: #17449e !important;
      font-weight: 500;
    }

    /* Yellow bold chevron — matches desktop custom-select arrow color */
    .new-dropdown-trigger::after {
      content: '' !important;
      width: 16px;
      height: 16px;
      flex-shrink: 0;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffe400' stroke-width='3' stroke-linecap='square' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E") !important;
      background-repeat: no-repeat;
      background-position: center;
      background-size: contain;
    }

    .new-dropdown-options {
      display: none;
      position: fixed;
      top: 36%;
      left: 0;
      right: 0;
      bottom: 0;
      width: -webkit-fill-available;
      background: #ffffff;
      z-index: 10000;
      overflow-y: auto;
    }

    /* Landscape mode adjustments - reduce dropdown height to avoid covering header */
    @media screen and (orientation: landscape) and (max-height: 600px) {
      body.is-mobile-device .new-dropdown-options {
        top: 44%;
        /* bottom: 0; */
      }

      /* Adjust X button position for landscape */
      body.is-mobile-device .new-dropdown-close-btn {
        /* top: 30%; */
      }
    }

    /* Header text styles — visual gradient handled by .custom-select-options-header */
    .new-dropdown-header {
      color: white;
      padding: 20px 15px 21px 20px;
      font-weight: 600;
      font-size: 17px;
      text-align: center;
      top: 27%;
      z-index: 10001;
      background: linear-gradient(135deg, #0056A6 0%, #17449e 100%);
      position: inherit;
      width: -webkit-fill-available;
      border-top-left-radius: 20px;
      border-top-right-radius: 20px;
      display: -webkit-inline-box;
      /* gap: 91px; */
      /* text-align: right; */
      width: -webkit-fill-available;
      float: right;
      display: inline-flex;
      /* flex-wrap: nowrap; */
      justify-content: space-between;
    }
    .new-dropdown-option {
      padding: 15px 20px;
      border-bottom: 1px solid #eee;
      cursor: pointer;
      font-size: 16px;
      color: #333;
      background: white;
    }

    .new-dropdown-option:hover {
      background-color: #c2d4ff;
      color: #000;
      font-weight: 600;
      letter-spacing: -0.018rem;
    }

    .new-dropdown-option:active {
      background: #e0e0e0;
    }

    .new-dropdown-close-btn {
      /* position: absolute; */
      /* right: 12px; */
      /* top: 50%; */
      /* transform: translateY(-50%); */
      background: none;
      border: none;
      color: #ffffff;
      font-size: 20px;
      font-weight: bold;
      cursor: pointer;
      z-index: 10002;
      padding: 5px;
      /* width: 38px; */
      /* height: 38px; */
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      border-radius: 50%;
      transition: background 0.15s;
    }

    .new-dropdown-close-btn:active {
      background: rgba(255, 255, 255, 0.2);
    }

    /* Open state */
    .new-custom-dropdown.open .new-dropdown-options {
      display: block;
    }

    /* DESKTOP OVERRIDE - Force regular dropdown on desktop devices */
    body.is-desktop-device .new-dropdown-options {
      position: absolute !important;
      top: 100% !important;
      left: 0 !important;
      right: auto !important;
      bottom: auto !important;
      max-height: 300px !important;
      width: 100% !important;
      border-radius: 8px !important;
      border-top-left-radius: 8px !important;
      border-top-right-radius: 8px !important;
      margin-top: 5px !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }

    body.is-desktop-device .new-dropdown-close-btn {
      display: none !important;
    }

    body.is-desktop-device .new-dropdown-header {
      display: none !important;
    }

    body.is-desktop-device .new-custom-dropdown {
      position: relative !important;
    }

    @media screen and (min-width: 481px) {
      #new-dropdowns-testing {
        display: none !important;
      }
    }

    /* Additional iOS-specific stability */
    @supports (-webkit-touch-callout: none) {
      @media screen and (max-width: 991px) {
        .mediz-mobile-header-wrap {
          -webkit-transform: none !important;
          transform: none !important;
          will-change: auto !important;
        }

        .mediz-mobile-header {
          -webkit-transform: none !important;
          transform: none !important;
          will-change: auto !important;
        }
      }
    }

    /* Small mobile devices - iPhone 12 mini, iPhone 12, and similar */
    @media screen and (max-width: 400px) and (hover: none) and (pointer: coarse),
    screen and (max-device-width: 400px),
    screen and (max-width: 400px) {

      body.is-mobile-device .custom-select-trigger {
        padding: 10px 6px !important;
        font-size: 11.5px !important;
        padding-top: 7px !important;
        padding-bottom: 7px !important;
      }

      body.is-mobile-device .new-dropdown-trigger {
        padding: 10px 6px !important;
        font-size: 11.5px !important;
        padding-top: 7px !important;
        padding-bottom: 7px !important;
        background: white !important;
        border: 2px solid #ddd !important;
        padding: 11px 15px !important;
        cursor: pointer !important;
        border-radius: 8px !important;
        font-size: 11.5px !important;
        color: #333 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 9px 11px !important;
        padding: 9px 9px !important;
        padding: 9px 5px !important;
        border: 2px solid #17449e !important;
        background: radial-gradient(circle, rgb(61 122 249) 0%, rgb(0, 22, 120) 100%) !important;
        letter-spacing: -0.00766rem !important;
        transition: none !important;
        transform: none !important;
        box-shadow: rgba(21, 57, 130, 0.87) 0px 0px 20px 15px inset !important;
        color: rgb(255, 255, 255) !important;
        padding: 9px 5px !important;
      }

    }

    /* Ensure it works on mobile too */
    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

      .custom-select-trigger.selected,
      .custom-select.has-value .custom-select-trigger,
      .custom-select.validated .custom-select-trigger {
        border: 2px solid #274c93 !important;
        border-color: #274c93 !important;
      }
    }

    /* Responsive styling for forms below 768px viewport - exclude custom dropdowns */
    @media (max-width: 768px) {

      #patientIntakeForm input:not(.custom-select-trigger):not(#emergency_contact_phone),
      #patientIntakeForm textarea,
      #patientIntakeForm #phone_placeholder_bg,
      #patientIntakeForm select:not(.custom-select) {
        padding: 8px !important;
        font-size: 13px !important;
      }

      /* Target inputs with inline styles specifically, but exclude custom dropdowns */
      #patientIntakeForm input[style*="font-size"]:not(.custom-select-trigger):not(#emergency_contact_phone),
      #patientIntakeForm textarea[style*="font-size"],
      #patientIntakeForm select[style*="font-size"]:not(.custom-select),
      #phone_placeholder_bg {
      }

      #patientIntakeForm input[style*="padding"]:not(.custom-select-trigger):not(#emergency_contact_phone),
      #patientIntakeForm textarea[style*="padding"],
      #patientIntakeForm select[style*="padding"]:not(.custom-select) {
        padding: 8px !important;
      }

      /* Adjust placeholder position for mobile padding */
      #phone_placeholder_bg {
      }

     #patientIntakeForm .custom-select-trigger:hover,
      .custom-select.has-value.validated.open .custom-select-trigger.selected {
          border-color: #041c4c !important;
          width: 100%;
          border-radius: 6px;
          cursor: pointer;
          font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
          overflow-wrap: break-word;
          word-break: break-word;
          -webkit-font-smoothing: antialiased;
          backface-visibility: hidden;
          image-rendering: auto;
          letter-spacing: -0.00766rem !important;
          transition: none !important;
          transform: none !important;
          color: rgb(255, 255, 255) !important;
          background: radial-gradient(circle, rgb(35, 84, 185) 0%, rgb(0, 22, 120) 100%) !important;
          box-shadow: none !important;
          outline: 0;
        }}

          /* Ensure it works on mobile too */
          @media (max-width: 476px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger.selected,
            .custom-select.has-value .custom-select-trigger,
            .custom-select.validated .custom-select-trigger {
              border-color: #3c5a94 !important;
              padding-top: 8px !important;
              padding-bottom: 8px !important;
              font-size: 11.5px !important;
              padding-left: 5px !important;
              padding-right: 3px !important;
              padding-top: 12px !important;
              padding-bottom: 10px !important;
              font-size: 11.5px !important;
              padding-left: 9px !important;
              padding-right: 9px !important;
            }
          }

          /* Ensure it works on mobile too */
          @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger.selected,
            .custom-select.has-value .custom-select-trigger,
            .custom-select.validated .custom-select-trigger {
              border-color: #3c5a94 !important;
              padding-top: 8px !important;
              padding-bottom: 8px !important;
              font-size: 11.5px !important;
              padding-left: 5px !important;
              padding-right: 3px !important;
              padding-top: 10px !important;
              padding-bottom: 8px !important;
              padding-left: 7px !important;
              padding-right: 7px !important;
            }
          }

          .custom-select-trigger.selected:focus-visible {
            box-shadow: 0 0 0 2px #08378f !important;
          }

          .mediz-body #patientIntakeForm input,
          .mediz-body #patientIntakeForm textarea,
          .mediz-body #patientIntakeForm select:focus-visible {
            outline: none;
          }

          @media (max-width: 576px) and (hover: hover) and (pointer: fine) {

            #patientIntakeForm .custom-select-trigger:hover,
            .custom-select.has-value.validated.open .custom-select-trigger.selected {
              cursor: pointer;
            }
          }

          .custom-select-trigger.selected:focus-visible {
            box-shadow: none !important;
            outline: aqua;
            border: -1px solid #00246a !important;
            box-shadow: inset 0 0 5px 1px #001f5a !important;
            outline: 0px solid #001429;
            border-color: #092b61 !important;
          }

  @media (max-width: 767px) and (hover: hover) and (pointer: fine) {
            .custom-select.has-value .custom-select-text,
            .custom-select-options .custom-select-trigger.selected .custom-select-text,
            .custom-select[data-selected="true"] .custom-select-text {font-size: 13px !important;}
          }

          @media (max-width: 467px) and (hover: hover) and (pointer: fine) {

            .custom-select-text {
              font-size: 12.5px !important;
            }

            #patientIntakeForm input[style*="font-size"]:not(.custom-select-trigger),
            #patientIntakeForm textarea[style*="font-size"],
            #patientIntakeForm select[style*="font-size"]:not(.custom-select) {
              font-size: 13px !important;
            }}

          @media (max-width: 380px) and (hover: hover) and (pointer: fine) {

            .custom-select.has-value .custom-select-text,
            .custom-select-options .custom-select-trigger.selected .custom-select-text,
            .custom-select[data-selected="true"] .custom-select-text {
              font-size: 12PX !important;
            }

            #patientIntakeForm input[style*="font-size"]:not(.custom-select-trigger),
            #patientIntakeForm textarea[style*="font-size"],
            #patientIntakeForm select[style*="font-size"]:not(.custom-select) {
              font-size: 12px !important;
            }}

          @media (max-width: 1050px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger {
              PADDING: 10.5PX !important;
              /* border-width: inherit !important; */
            }

            }

          @media (max-width: 976px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger {
              PADDING: 11.5PX !important;
              /* border-width: 1px  !important; */
            }

            }

          @media (max-width: 767px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger {
              PADDING: 9PX !important;
              /* border-width: 2px !important; */
            }
.custom-select-text {font-size: 12.5px !important;}
            }

          @media (max-width: 567px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger {
              PADDING: 9.5PX !important;
            }

            }

       @media (max-width: 576px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger {
              PADDING: 9PX !important;
            }

            }

@media (max-width: 476px) and (hover: hover) and (pointer: fine) {
    .custom-select-trigger {
        padding: 10px !important;
    }
}

       @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

            .custom-select-trigger {
              PADDING: 12.5PX !important;

            }

            }

          @media (max-width: 400px) and (hover: hover) and (pointer: fine) {

            #patientIntakeForm .custom-select-trigger:hover,
            .custom-select.has-value.validated.open .custom-select-trigger.selected {
            }

            .mediz-body .custom-select-trigger.selected,
            .mediz-body .custom-select.has-value .custom-select-trigger {
              PADDING: 8.5pX 6px !important;
              border-width: 2px !important;
              border-color: #002276 !important;
            }

            .custom-select-text {
              font-size: 12px !important;
            }

            .custom-select-trigger {
              PADDING: 9px 6.5px !important;
              /* padding-left: 5.5px !important; */
            }

          }

          .form-group.field-error .input-group input,
          #patientIntakeForm input[style*="padding"]:not(.custom-select-trigger),
          .form-group.field-error .input-group input {
            box-shadow: inset 0 0 17px 9px #bf04040a;
          }

          .form-group .input-group input,
          #patientIntakeForm input[style*="padding"]:not(.custom-select-trigger),
          #patientIntakeForm textarea[style*="padding"],
          #patientIntakeForm select[style*="padding"]:not(.custom-select),
          .form-group.field-error input-group text {
        PADDING: 10.5PX !important;
        }

        #patientIntakeForm input[style*="padding"]:not(.custom-select-trigger) .form-group.field-error .input-group input {
          box-shadow: inset 0 0 17px 9px #bf04040a;
        }

        .form-group.field-error .input-group input,
        #patientIntakeForm input[style*="padding"]:not(.custom-select-trigger),
        #patientIntakeForm textarea[style*="padding"],
        #patientIntakeForm select[style*="padding"]:not(.custom-select),
        .form-group.field-error input-group text {
          box-shadow: inset 0 0 20px 13px #c8c8c854;
          font-weight: 500 !important;
        }

  /* ADD ALL INTO form-custom.css afterwards */

.form-with-none-btn-container {
    display: flex;
    gap: 17px;
    align-items: baseline;
    justify-content: center;
    align-content: center;
}

.none-flex-default {
    min-height: -webkit-fill-available;
    margin-top: -2px !important;
    display: inline-flex !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
    flex: 3;
}

.none-btn-delete-btn-container {
    flex: 3;
    display: inline-flex;
    align-content: center;
    flex-wrap: nowrap;
    row-gap: 13px;
    align-items: flex-start;
    min-height: -webkit-fill-available;
    flex-direction: column;
    margin: auto;
}

form-group.medical-condition-field.input-group textarea {
    font-size: 16px !important;
}

form-group.medical-condition-field.textarea {
    font-size: 16px !important;
}

.mediz-body input, .mediz-body textarea, .mediz-body select, .woocommerce form .select2-selection ::-webkit-input-placeholder {
    color: #333333 !important;
}

.mediz-body input, .mediz-body textarea, .mediz-body select, .woocommerce form .select2-selection ::-moz-placeholder {
    color: #434343;
}

.mediz-body input, .mediz-body textarea, .mediz-body select, .woocommerce form .select2-selection :-ms-input-placeholder {
    color: #331111;
}

/* Ensure consistent placeholder color for all phone inputs (including Inputmask) */
input[type="tel"]::placeholder,
input[type="tel"]::-webkit-input-placeholder {
  color: #666666 !important;
  opacity: 1;
}

input[type="tel"]::-moz-placeholder {
  color: #666666 !important;
  opacity: 1;
}

input[type="tel"]:-ms-input-placeholder {
  color: #666666 !important;
  opacity: 1;
}

/* Specific targeting for phone number and emergency contact phone */
#phone_number::placeholder,
#phone_number::-webkit-input-placeholder {
  color: #666666 !important;
  opacity: 1;
}

#phone_number::-moz-placeholder {
  color: #666666 !important;
  opacity: 1;
}

#phone_number:-ms-input-placeholder {
  color: #666666 !important;
  opacity: 1;
}

/* EMERGENCY CONTACT PHONE - MATCH MAIN PHONE NUMBER COLOR */
.mediz-body #emergency_contact_phone::placeholder,
.mediz-body #emergency_contact_phone::-webkit-input-placeholder,
#emergency_contact_phone::placeholder,
#emergency_contact_phone::-webkit-input-placeholder {
  color: #666666 !important;
  opacity: 1 !important;
}

.mediz-body #emergency_contact_phone::-moz-placeholder,
#emergency_contact_phone::-moz-placeholder {
  color: #666666 !important;
  opacity: 1 !important;
}

.mediz-body #emergency_contact_phone:-ms-input-placeholder,
#emergency_contact_phone:-ms-input-placeholder {
  color: #666666 !important;
  opacity: 1 !important;
}

.mediz-body input, .mediz-body textarea, .mediz-body select, .woocommerce form .select2-selection :-moz-placeholder {
    color: #514141;
} 

form-group medical-condition-field.input-group #medical_conditions {
      font-size: 14px !important;
}

.mediz-body input, .mediz-body textarea, .mediz-body select, .woocommerce form .select2-selection {
    color: #000000;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    background: white;
    cursor: text;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.00766rem !important;
    font-weight: 500;
    border-width: 2px !important;
    animation: none !important
}

.radio-option.selected label {
    color:#fff !important;
}

.radio-option:hover label {
    color: rgb(255 252 252) !important;
}

input#smoking_never {
    border-color: rgb(255, 218, 116) !important;
    padding: 10px !important;
    background: linear-gradient(185deg, rgb(248 248 248) 0%, #ced4da 100%) rgb(255 255 255) !important;
    position: relative;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    overflow: hidden;
    appearance: none !important;
    border-radius: 50% !important;
}
input#smoking_never,
input#smoking_former,
input#smoking_current,
input#alcohol_never, 
input#alcohol_occasionally,
input#alcohol_moderately,
input#alcohol_heavily
{
    position: relative;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    overflow: hidden;
    appearance: none !important;
    width: 17px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background-color: rgb(255, 255, 255) !important;
    border: 3.5px solid rgb(121 121 121) !important;
    padding: 6px !important;
    background-color: #dfdfdf !important;
    background: linear-gradient(185deg, rgb(248 248 248) 0%, #ced4da 100%) rgb(255 255 255) !important;
}

input#smoking_never:checked,
input#smoking_former:checked,
input#smoking_current:checked,
input#alcohol_never:checked,
input#alcohol_occasionally:checked,
input#alcohol_moderately:checked,
input#alcohol_heavily:checked
{
    border-color: rgb(244 221 47) !important;
    padding: 6px !important;
    border-color: rgb(255 231 48) !important;
    background: #ffe730 !important;
}

p.form-header-line {
    margin-bottom: 0;
    border-bottom-color: rgb(29 29 29 / 77%) !important;
    box-shadow: 6px 2px 0px 0px #00229b63 !important;
    border: 0 !important;
}

/* NEW ADDONG december 25th fixing all background change to grey so forms visible */  
.mediz-body-outer-wrapper, body.mediz-full .mediz-body-wrapper, .mediz-header-side-content {
    background-color: #f5f5f5;
    background-color: #d7d7d7;
}


@media (min-width: 1050px) and (hover: hover) and (pointer: fine) {
.mediz-body .custom-select-trigger.selected, .mediz-body .custom-select.has-value .custom-select-trigger {

 PADDING: 11.5PX !important;

}
}

@media (max-width: 767px) and (hover: hover) and (pointer: fine) {
    .mediz-body .custom-select-trigger.selected, .mediz-body .custom-select.has-value .custom-select-trigger {
        /* padding: 9.5px !important; */
    }
}

    @media (max-width: 576px) and (hover: hover) and (pointer: fine) {
        .mediz-body .custom-select-trigger.selected, .mediz-body .custom-select.has-value .custom-select-trigger {
            /* PADDING: 10PX !important; */
            /* padding-left: 5px !important; */
    }
    }

    @media (max-width: 400px) and (hover: hover) and (pointer: fine) {
        .mediz-body .custom-select-trigger.selected, .mediz-body .custom-select.has-value .custom-select-trigger {
            /* PADDING: 9PX 6.2px !important; */
        }
    }


@media (max-width: 400px) and (hover: hover) and (pointer: fine) {
.custom-select.has-value.validated .custom-select-trigger.selected {/* padding: 11px 8px !important; *//* padding-left: 5.5px !important; */}
}

@media (max-width: 380px) and (hover: hover) and (pointer: fine) {
    .custom-select.has-value.validated .custom-select-trigger.selected {
        padding-left: 4px !important;
    }
}

/* ============================================================
   OVERRIDE LAYER — appended last for cascade priority.
   These supersede all earlier rules for the same selectors.
   ============================================================ */

/* ============================================================
   MOBILE: NEUTRALIZE open-upward — ALWAYS use regular bottom-sheet
   open-upward is a desktop-only feature. On true mobile / is-mobile-device,
   the dropdown must NEVER slide down from the top of the screen.
   This block is placed last in the cascade to override all earlier rules.
   ============================================================ */
body.is-true-mobile-device .custom-select.open-upward .custom-select-options,
body.is-mobile-device .custom-select.open-upward .custom-select-options {
  /* NEUTRALIZE open-upward: force same fixed bottom-sheet as regular open */
  position: fixed !important;
  top: 25% !important;
  bottom: auto !important;
  left: 0 !important;
  width: 100vw !important;
  height: 75vh !important;
  /* Regular bottom-sheet borders */
  border-top: 3px solid var(--primary-blue) !important;
  border-bottom: none !important;
  /* Round top corners like the regular mobile sheet */
  border-radius: 20px 20px 0 0 !important;
  border-top-left-radius: 20px !important;
  border-top-right-radius: 20px !important;
  /* Shadow points up (sheet slides from bottom) */
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
  padding-top: 0 !important;
  padding-bottom: 40px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Same rule via media query — covers Chrome DevTools device emulation
   where is-mobile-device body class is NOT added by JS */
@media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .custom-select-options {
        /* position: fixed; */
        bottom: auto !important;
        left: 0 !important;
        width: -webkit-fill-available;
        /* height: -webkit-fill-available; */
        /* max-height: 110vw !important; */
        background-color: transparent;
        background-color: #ffffff;
        /* border: none !important; */
        border-top: 3px solid var(--primary-blue) !important;
        border-radius: 0 !important;
        z-index: 9999;
        padding-top: 0px !important;
        padding-bottom: 0px !important;
        padding-right: 0px;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
        overflow-y: auto;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: none !important;
        top: 40% !important;
  }
}

/* ============================================================
   UNIVERSAL CLOSE BUTTON FIX — all mobile dropdown close buttons
   Ensures X button is ALWAYS visible and properly positioned
   ============================================================ */
body.is-true-mobile-device .custom-select-close-btn,
body.is-true-mobile-device .new-dropdown-close-btn,
body.is-true-mobile-device .custom-dropdown-close-btn,
body.is-mobile-device .custom-select-close-btn,
body.is-mobile-device .new-dropdown-close-btn,
body.is-mobile-device .custom-dropdown-close-btn {
  /* position: fixed; */
  display: inline-flex;
  top: 24%;
  /* right: 20px; */
  color: white !important;
  /* font-size: 28px; */
  font-weight: bold !important;
  z-index: 10001 !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  /* padding: 5px !important; */
  /* width: 40px; */
  /* height: 40px; */
  display: flex !important;
  align-items: stretch;
  justify-content: flex-end;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  align-content: space-around;
}

button.new-dropdown-close-btn {}

@media screen and (max-width: 768px) and (hover: none) and (pointer: coarse) {
  body.is-true-mobile-device .custom-select-close-btn,
  body.is-true-mobile-device .custom-dropdown-close-btn,
  body.is-mobile-device .custom-select-close-btn,
  body.is-mobile-device .new-dropdown-close-btn,
  body.is-mobile-device .custom-dropdown-close-btn {
    /* width: 20px !important; */
    /* height: 20px !important; */
    /* font-size: 22px !important; */
    /* right: 24px !important; */
    /* top: 37%; */
    /* position: fixed; */
  }
}

@media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .custom-select-close-btn,
  .new-dropdown-close-btn,
  .custom-dropdown-close-btn {
    /* position: fixed !important; */
    /* right: 20px !important; */
    color: white !important;
    /* font-size: 28px !important; */
    font-weight: bold !important;
    z-index: 10001 !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    padding: 5px !important;
    /* width: 40px !important; */
    /* height: 40px !important; */
    /* display: flex !important; */
    /* align-items: center !important; */
    /* justify-content: center !important; */
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}


/* ============================================================
   TOUCH-LAPTOP TRIPLE-LOCK — Final CSS override layer
   When the PRIMARY pointer is fine (mouse/trackpad = desktop),
   ALWAYS hide the mobile new-custom-dropdown and show the
   desktop custom-select — regardless of any JS body class.

   Why: touch laptops where user has no mouse connected get
   pointer:coarse briefly, which can trip JS detection.
   CSS media queries cannot be faked by UA spoofing.

   Safe for phones/tablets: their primary pointer is always
   coarse (no mouse), so this rule never matches them.
   ============================================================ */
@media (pointer: fine) {
  .new-custom-dropdown {
    display: none !important;
  }
  .custom-select {
    /* display: block !important; */
  }
}

/* Explicit desktop device lock — belt-and-suspenders with JS class */
body.is-desktop-device .new-custom-dropdown {
  display: none !important;
}
body.is-desktop-device .custom-select {
  /* display: block !important; */
}


/* ── HEADER: hidden everywhere by default, shown only on mobile ── */
.custom-select-options-header {
  /* display: none; */
}

body:not(.is-mobile-device) .custom-select-options-header {
  /* display: none; */
}

/* Desktop pointer:fine lock — belt-and-suspenders */
@media (pointer: fine) {
  .custom-select-options-header {
    display: none !important;
  }
}

body.is-mobile-device .custom-select-options-header {
  display: inline-flex !important;
  position: relative;
  top: 0;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0056A6 0%, #17449e 100%);
  color: #ffffff;
  padding: 19px 52px 18px 20px;
  font-weight: 600;
  font-size: 19px;
  min-height: 61px;
  box-sizing: border-box;
  width: 100%;
  z-index: 500000;
  flex-shrink: 0;
}

/* Same via media query — covers Chrome DevTools device emulation */
@media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .custom-select-options-header {
    display: inline-flex;
    position: fixed; */
    align-items: center;
    top: inherit;
    justify-content: space-between;
    background: linear-gradient(135deg, #0056A6 0%, #17449e 100%);
    color: #ffffff;
    padding: 19px 52px 18px 20px;
    font-weight: 600;
    font-size: 19px;
    /* min-height: 43px; */
    box-sizing: border-box;
    width: 100%;
    z-index: 500000;
    flex-shrink: 0;
    border-radius: 20px 20px 0 0 !important;
    /* top: 103px; */
    align-items: stretch;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom: 3px solid #f2b80c !important;
    background: radial-gradient(circle, #2354b9 0%, #001670 100%);
    /* bottom: auto !important; */
    /* MARGIN-BOTTOM: 20PX !IMPORTANT; */
    /* MARGIN-TOP: -20PX !IMPORTANT; */
    MARGIN-TOP: -60PX !IMPORTANT;
  }
}

body.is-mobile-device .custom-select-options-header .custom-select-close-btn {
  position: absolute !important;
  top: 50% !important;
  right: 14px !important;
  transform: translateY(-50%) !important;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 26px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  z-index: 10002;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
  padding: 0;
  margin: 0;
}

/* Same via media query — covers Chrome DevTools device emulation */
@media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .custom-select-options-header .custom-select-close-btn {
    position: absolute !important;
    top: 20% !important;
    /* right: 14px !important; */
    /* transform: translateY(-50%) !important; */
    /* background: none; */
    border: none;
    color: #ffffff;
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 10002;
    /* width: 40px; */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
  }
}

body.is-mobile-device .custom-select-options-header .custom-select-close-btn:active {
  background: rgba(255, 255, 255, 0.25);
}



@media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
	.custom-select-options {
		position: fixed;
		top: auto !important;
		bottom: 0 !important;
		left: 0 !important;
		width: -webkit-fill-available;
		height: -webkit-fill-available;
		max-height: 145vw;
		ckground-color: #ffffff;
		/* border: none !important; */
		border-top: 3px solid var(--primary-blue) !important;
		border-radius: 0 !important;
		z-index: 9999;
		/* padding-top: 0px !important; */
		/* padding-bottom: 0px !important; */
		/* padding-right: 0px; */
		box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
		overflow-y: auto;
		scroll-behavior: smooth !important;
		-webkit-overflow-scrolling: touch !important;
		scroll-snap-type: none !important;
		top: 24% !important;
	}
}


@media screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .custom-select.open .custom-select-options {
        position: fixed !important;
        top: 41% !important;
        bottom: auto !important;
        left: 0 !important;
        width: -webkit-fill-available;
        height: -webkit-fill-available;
        max-height: 113vw !important;
        background-color: #ffffff;
        border-top: 3px solid var(--primary-blue) !important;
        border-radius: 0 !important;
        z-index: 9999;
        padding-top: 0px !important;
        padding-bottom: 0px !important;
        padding-right: 0px;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
        overflow-y: auto;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: none !important;
        border: 0;
        background: #ffffff!important;
        border: 0 !important;
  }
}




@media screen and (max-width: 767px) and (hover: none) and (pointer: coarse) {
  .custom-select.open .custom-select-options {
        position: fixed !important;
        top: 48% !important;
        bottom: auto !important;
        left: 0 !important;
        width: -webkit-fill-available;
        height: -webkit-fill-available;
        max-height: 113vw !important;
        background-color: #ffffff;
        border-top: 3px solid var(--primary-blue) !important;
        border-radius: 0 !important;
        z-index: 9999;
        padding-top: 0px !important;
        padding-bottom: 0px !important;
        padding-right: 0px;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3) !important;
        overflow-y: auto;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: none !important;
        border: 0;
        background: #ffffff!important;
        border: 0 !important;
  }
}