/* ==========================================================================
   NFH Search Form Styling - v11.0 (Final with Custom Animation)
   ========================================================================== */

/* --- Universal Font Family --- */
.nfh-search-form,
.nfh-search-form * {
    font-family: 'Sohnee', sans-serif !important;
}

/* --- General Form Layout & Spacing --- */
.nfh-search-form .form-legend { display: none; }
.nfh-search-form fieldset { border: none; padding: 0; margin: 0; }
.nfh-search-form .nfh-form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; align-items: end; }
.nfh-search-form .form-group { display: flex; flex-direction: column; }

/* --- Labels: Font Size & Weight --- */
.nfh-search-form .form-group > label {
    color: #253c49;
    margin-bottom: 8px;
    font-size: 16px !important;
    font-weight: 300 !important;
}

/* --- Keyword Input --- */
.nfh-search-form .keyword-wrapper { position: relative; }
.nfh-search-form .keyword-wrapper input[type="search"] {
    width: 100%; height: 48px; padding: 12px 50px 12px 12px;
    border: 1px solid #707070; border-radius: 0;
    color: #003d52; background-color: #fff; box-sizing: border-box;
    font-size: 14px !important; font-weight: 200 !important;
}

/* --- Search Button: With User's Custom Animation --- */
.nfh-search-form .search-submit-btn {
    /* Layout */
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    border: 1px solid #253c49;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;

    /* User's Animation Code */
    background-image: linear-gradient(to bottom, #253c49 50%, #fff 50%);
    background-size: 100% 200%;
    background-position: left top;
    color: #fff;
    transition: all 0.4s ease-out;
}

.nfh-search-form .search-submit-btn:hover {
    background-position: left bottom;
    color: #253c49;
}

.nfh-search-form .search-submit-btn .screen-reader-text { display: none; }

/* ==========================================================================
   CUSTOM DROPDOWN - DEFINITIVE FIX
   ========================================================================== */
.nfh-search-form .nfh-custom-dropdown { position: relative; }
.nfh-search-form .nfh-custom-dropdown .nfh-hidden-select { display: none; }

.nfh-search-form .nfh-custom-dropdown button.nfh-dropdown-trigger {
    display: block !important; width: 100% !important; height: 48px !important;
    padding: 12px !important; margin: 0 !important; box-sizing: border-box !important;
    -webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important;
    background: #fff !important; border: 1px solid #707070 !important; border-radius: 0 !important;
    color: #003d52 !important; cursor: pointer !important;
    font-size: 14px !important; font-weight: 200 !important;
    text-align: left !important;
    white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
    display: flex !important; justify-content: space-between !important; align-items: center !important;
}

/* Arrow styling */
.nfh-search-form .nfh-dropdown-trigger::after { content: ''; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #333; transition: transform 0.2s; }
.nfh-search-form .nfh-custom-dropdown.is-open .nfh-dropdown-trigger::after { transform: rotate(180deg); }
.nfh-search-form .nfh-custom-dropdown.is-open .nfh-dropdown-trigger { border-color: #0076a8 !important; }

/* --- Options List --- */
.nfh-search-form .nfh-options-list {
    display: none; position: absolute; top: calc(100% + 2px); left: 0; width: 100%;
    background-color: #fff; border: 1px solid #0076a8; max-height: 280px; overflow-y: auto; z-index: 1000;
    padding: 10px; box-sizing: border-box;
}
.nfh-search-form .nfh-custom-dropdown.is-open .nfh-options-list { display: block; }
.nfh-search-form .nfh-options-list .option-item { display: flex; align-items: center; padding: 10px 4px; cursor: pointer; transition: background-color 0.2s ease; }
.nfh-search-form .nfh-options-list .option-item:hover { background-color: #f4f4f4; }
.nfh-search-form .nfh-options-list .option-item label {
    color: #003d52; margin-bottom: 0; margin-left: 12px; width: 100%; cursor: pointer;
    font-size: 14px !important; font-weight: 200 !important;
}

/* Custom Radio Button */
.nfh-search-form .nfh-options-list input[type="radio"] { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-color: #fff; margin: 0; width: 20px; height: 20px; border: 1px solid #707070; border-radius: 50%; display: grid; place-content: center; cursor: pointer; flex-shrink: 0; }
.nfh-search-form .nfh-options-list input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; transform: scale(0); transition: 120ms transform ease-in-out; background-color: #003d52; }
.nfh-search-form .nfh-options-list input[type="radio"]:checked::before { transform: scale(1); }

/* --- Responsive Styling --- */
@media (max-width: 768px) {
    .nfh-search-form .nfh-form-grid { grid-template-columns: 1fr; gap: 0; }
    .nfh-search-form .form-group { margin-bottom: 25px; }
    .nfh-search-form .form-group:last-child { margin-bottom: 0; }
}