/**
 * Nairobi City Select - Styles
 * Strictly scoped to ONLY the Nairobi city/area field.
 * Works with standard Woo checkout + CheckoutWC.
 */

:root {
    --nairobi-primary: #1c3545;
    --nairobi-accent: #840037;
}

/* Make the label prominent and non-italic for this field only */
.woocommerce form .nairobi-city-row label {
    font-weight: 700;
    font-style: normal;
    color: var(--nairobi-primary);
    margin-bottom: 6px;
}

/* Container (added by JS after selectWoo/select2 init) */
.nairobi-select2-container {
    width: 100% !important;
    display: block;
    margin-bottom: .6em;
}

/* Some themes position the container; spacing on the visible selection is extra-safe */
.nairobi-select2-container .select2-selection--single {
    margin-bottom: .6em;
}

.nairobi-select2-container .select2-selection--single {
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    min-height: 44px;
}

.nairobi-select2-container .select2-selection--single:hover,
.nairobi-select2-container.select2-container--focus .select2-selection--single,
.nairobi-select2-container.select2-container--open .select2-selection--single {
    border-color: var(--nairobi-accent);
}

/* Fix illegible/faded text (some themes apply opacity) */
.nairobi-select2-container .select2-selection--single .select2-selection__rendered {
    color: var(--nairobi-primary) !important;
    opacity: 1 !important;
    padding: 6px 10px;
    line-height: 1.6;
}

.nairobi-select2-container .select2-selection--single .select2-selection__placeholder {
    color: var(--nairobi-primary) !important;
    opacity: 0.85 !important;
}

/* Dropdown menu (scoped via dropdownCssClass option) */
.nairobi-select2-dropdown.select2-dropdown {
    border: 2px solid var(--nairobi-accent);
    border-top: none;
    border-radius: 0 0 4px 4px;
    background-color: #fff;
}

.nairobi-select2-dropdown .select2-search--dropdown {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.nairobi-select2-dropdown .select2-search--dropdown .select2-search__field {
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 8px 10px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.nairobi-select2-dropdown .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: var(--nairobi-accent);
}

.nairobi-select2-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: var(--nairobi-primary);
    color: #fff;
}

/* Ensure dropdown overlays properly */
form.checkout .nairobi-select2-container.select2-container--open,
.cfw-checkout .nairobi-select2-container.select2-container--open {
    z-index: 1000;
}

/* Zone info / no shipping */
.nairobi-zone-info,
.nairobi-no-shipping {
    margin-top: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f7f7f7;
    border-left: 4px solid var(--nairobi-accent);
    border-radius: 4px;
    font-size: 14px;
    color: var(--nairobi-primary);
    line-height: 1.6;
}

.nairobi-no-shipping a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Description (help text) for this field only */
.woocommerce form .nairobi-city-row .description {
    color: #333;
    font-weight: 300;
    font-size: .875em;
    margin-top: 0;
    margin-bottom: .6em;
    font-style: normal;
}

/* Core WooCommerce/CheckoutWC "no shipping" message (from filter) */
.nairobi-no-shipping-core {
    color: var(--nairobi-primary);
    font-weight: 300;
    margin: 0;
}
