/*
 * FooEvents Extra Nights — Stars On Board frontend treatment
 * Scoped to .fen-selector so theme/WooCommerce controls outside the add-on are untouched.
 */

.fen-selector {
    --fen-gold: #c6a15b;
    --fen-gold-dark: #9f7b39;
    --fen-text: #202020;
    --fen-muted: #6f6a61;
    --fen-border: #ddd4c4;
    --fen-surface: #ffffff;
    --fen-surface-soft: #fbf9f5;
    position: relative;
    clear: both;
    width: 100%;
    margin: 28px 0 26px;
    padding: 24px 24px 25px;
    overflow: hidden;
    border: 1px solid var(--fen-border);
    border-radius: 0;
    background: linear-gradient(180deg, var(--fen-surface) 0%, var(--fen-surface-soft) 100%);
    box-shadow: 0 12px 34px rgba(28, 24, 17, 0.06);
    color: var(--fen-text);
    font-family: inherit;
}

.fen-selector::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--fen-gold);
}

.fen-selector__header {
    position: relative;
    margin: 0 0 20px;
    padding: 0 0 16px;
    border-bottom: 1px solid rgba(198, 161, 91, 0.28);
}

.fen-selector__header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 52px;
    height: 1px;
    background: var(--fen-gold);
}

.single-product .fen-selector .fen-selector__heading {
    margin: 0;
    padding: 0;
    color: var(--fen-text);
    font: inherit;
    font-size: clamp(18px, 1.35vw, 22px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-transform: none;
}

.single-product .fen-selector .fen-selector__note {
    margin: 7px 0 0;
    color: var(--fen-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
}

.fen-selector__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.fen-selector__field {
    min-width: 0;
    margin: 0;
}

.single-product .fen-selector .fen-selector__label {
    display: block;
    margin: 0 0 9px;
    color: var(--fen-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fen-selector__select-wrap {
    position: relative;
    width: 100%;
}

.fen-selector__select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 17px;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 1.5px solid var(--fen-gold-dark);
    border-bottom: 1.5px solid var(--fen-gold-dark);
    pointer-events: none;
    transform: rotate(45deg);
    transform-origin: center;
}

.single-product .fen-selector select.fen-selector__select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 52px;
    margin: 0;
    padding: 0 46px 0 15px;
    border: 1px solid var(--fen-border);
    border-radius: 0;
    outline: none;
    background: #fff;
    background-image: none;
    color: var(--fen-text);
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 50px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.single-product .fen-selector select.fen-selector__select:hover {
    border-color: rgba(159, 123, 57, 0.72);
    background-color: #fffdf8;
}

.single-product .fen-selector select.fen-selector__select:focus,
.single-product .fen-selector select.fen-selector__select:focus-visible {
    border-color: var(--fen-gold);
    box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.16);
}

.single-product .fen-selector select.fen-selector__select option {
    color: #222;
    background: #fff;
}

@media (max-width: 767px) {
    .fen-selector {
        margin: 22px 0;
        padding: 21px 18px 22px;
    }

    .fen-selector__header {
        margin-bottom: 17px;
        padding-bottom: 14px;
    }

    .fen-selector__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .single-product .fen-selector select.fen-selector__select {
        height: 50px;
        font-size: 16px; /* Prevents iOS zoom on focus. */
        line-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .single-product .fen-selector select.fen-selector__select {
        transition: none;
    }
}

/* v1.2.1 — variation-aware per-night rate states */
.fen-selector__rate {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-left: 2px solid var(--fen-gold);
    background: rgba(198, 161, 91, 0.08);
    color: var(--fen-muted);
    font: inherit;
    font-size: 13px;
    line-height: 1.55;
}

.fen-selector--disabled .fen-selector__rate {
    border-left-color: var(--fen-border);
    background: rgba(111, 106, 97, 0.06);
}

.single-product .fen-selector select.fen-selector__select:disabled {
    border-color: #e4dfd6;
    background-color: #f8f6f2;
    color: #9a958c;
    cursor: not-allowed;
    opacity: 0.78;
}

.fen-selector--disabled .fen-selector__select-wrap::after {
    opacity: 0.45;
}
