/* —— Amana custom select (system droplist) —— */
:root {
    --am-sel-ink: #0b2740;
    --am-sel-ink-mid: #12324f;
    --am-sel-teal: #0d6e6e;
    --am-sel-teal-soft: #e6f3f3;
    --am-sel-sand: #c4a35a;
    --am-sel-line: #d5dee8;
    --am-sel-bg: #ffffff;
    --am-sel-radius: 12px;
}

select.am-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.am-select {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    font-family: "Cairo", ui-sans-serif, system-ui, sans-serif;
    z-index: 1;
}

    .am-select.is-open {
        z-index: 40;
    }

.am-select-trigger {
    width: 100%;
    min-height: 46px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--am-sel-line);
    border-radius: var(--am-sel-radius);
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    color: var(--am-sel-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    text-align: right;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease, background 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

    .am-select-trigger:hover {
        border-color: color-mix(in srgb, var(--am-sel-teal) 40%, var(--am-sel-line));
        box-shadow: 0 6px 16px rgba(11, 39, 64, 0.08);
    }

    .am-select.is-open .am-select-trigger,
    .am-select-trigger:focus-visible {
        outline: none;
        border-color: var(--am-sel-teal);
        box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.14), 0 8px 18px rgba(11, 39, 64, 0.1);
        background: #fff;
    }

.am-select-ico {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--am-sel-teal-soft), #edf5f8);
    color: var(--am-sel-teal);
    border: 1px solid color-mix(in srgb, var(--am-sel-teal) 20%, #fff);
    box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.05);
}

    .am-select-ico svg {
        width: 16px;
        height: 16px;
    }

.am-select-value {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.am-select-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-select-text {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--am-sel-ink);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.am-select.is-placeholder .am-select-text {
    color: #94a3b8;
    font-weight: 700;
}

.am-select-arrow {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #eef3f8;
    border: 1px solid #d5dee8;
    color: var(--am-sel-ink-mid);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease, color 0.18s ease;
}

    .am-select-arrow svg {
        width: 16px;
        height: 16px;
    }

.am-select.is-open .am-select-arrow {
    transform: rotate(180deg);
    background: linear-gradient(135deg, var(--am-sel-ink-mid), var(--am-sel-teal));
    border-color: transparent;
    color: #fff;
}

.am-select-menu-host {
    position: absolute;
    inset: 0;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 20000;
}

.am-select-menu {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: min(280px, 48vh);
    overflow: auto;
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--am-sel-ink-mid) 16%, #fff);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 18px 40px rgba(11, 39, 64, 0.2), 0 0 0 1px rgba(196, 163, 90, 0.2);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--am-sel-ink-mid) 40%, #fff) transparent;
    z-index: 20000;
    pointer-events: auto;
}

    .am-select-menu[hidden] {
        display: none !important;
    }

    .am-select-menu.is-open {
        display: flex !important;
    }

    .am-select-menu::before {
        content: "";
        position: absolute;
        inset-inline: 12px;
        top: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--am-sel-sand), var(--am-sel-teal), transparent);
        opacity: 0.75;
        pointer-events: none;
    }

.am-select-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 42px;
    padding: 0.45rem 0.65rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--am-sel-ink);
    font: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: right;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

    .am-select-option:hover,
    .am-select-option.is-active {
        background: color-mix(in srgb, var(--am-sel-teal) 10%, #fff);
        color: var(--am-sel-ink-mid);
    }

    .am-select-option.is-selected {
        background: #def2e5;
        color: #1c2633;
        box-shadow: 0 6px 14px rgba(11, 39, 64, 0.18);
    }

    .am-select-option.is-disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

.am-select-option-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--am-sel-teal) 55%, #94a3b8);
    box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.1);
    flex-shrink: 0;
}

.am-select-option.is-selected .am-select-option-dot {
    background: var(--am-sel-sand);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.am-select-option-check {
    width: 18px;
    height: 18px;
    opacity: 0;
    color: #a7f3d0;
}

.am-select-option.is-selected .am-select-option-check {
    opacity: 1;
}

.am-select-option-check svg {
    width: 18px;
    height: 18px;
    display: block;
}

.am-select.is-disabled .am-select-trigger {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* Compact — photo kinds, dense toolbars */
.am-select--sm .am-select-trigger {
    min-height: 34px;
    padding: 0.2rem 0.45rem;
    gap: 0.4rem;
    border-radius: 9px;
}

.am-select--sm .am-select-ico {
    width: 24px;
    height: 24px;
    border-radius: 7px;
}

    .am-select--sm .am-select-ico svg {
        width: 13px;
        height: 13px;
    }

.am-select--sm .am-select-label {
    display: none;
}

.am-select--sm .am-select-text {
    font-size: 0.78rem;
}

.am-select--sm .am-select-arrow {
    width: 22px;
    height: 22px;
    border-radius: 7px;
}

    .am-select--sm .am-select-arrow svg {
        width: 13px;
        height: 13px;
    }

.am-select--sm .am-select-option {
    min-height: 36px;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
}

/* Inside building editor field row: blend with field chrome */
.bld-field .am-select {
    flex: 1;
    min-width: 0;
}

.bld-field .am-select-trigger {
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 44px;
    padding: 0.25rem 0.15rem 0.25rem 0;
    border-radius: 0;
}

    .bld-field .am-select-trigger:hover,
    .bld-field .am-select.is-open .am-select-trigger,
    .bld-field .am-select-trigger:focus-visible {
        box-shadow: none;
        border: 0;
        background: transparent;
    }

.bld-field .am-select-ico {
    display: none;
}

.bld-field .am-select-label {
    display: none;
}

.bld-field .am-select-trigger {
    grid-template-columns: 1fr auto;
}

.bld-field:focus-within {
    border-color: color-mix(in srgb, var(--am-sel-teal) 55%, var(--am-sel-line));
    box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.12);
}

.bld-field:has(.am-select.is-open) {
    border-color: var(--am-sel-teal);
    box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.14);
    z-index: 5;
}

/* Standalone selects (wo modal, filters, admin) */
.wo-modal .am-select-trigger,
.wo-edit-field .am-select-trigger,
.sr-list-page .am-select-trigger,
.sk-field .am-select-trigger,
.admin-modal .am-select-trigger {
    min-height: 44px;
}

.wo-edit-field .am-select-label,
.sr-filter-field .am-select-label {
    display: none;
}
