/**
 * Restaurant admin branch switcher — Filament topbar integration.
 * Standalone stylesheet (Tailwind-independent) so JIT/purge cannot strip rules.
 */

.branch-scope-slot,
.branch-scope-slot * {
    box-sizing: border-box;
}

/* Keeps branch control on one row inside the horizontal topbar flex area */
.branch-scope-slot {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    align-self: center !important;
    gap: 0.5rem;
    margin-inline-start: 0.75rem;
    padding-inline-start: 0.875rem;
    border-inline-start: 1px solid rgba(148, 163, 184, 0.55);
    max-width: max-content;
}

.dark .branch-scope-slot {
    border-inline-start-color: #EDE4D8;
}

.branch-scope-slot__form {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.branch-scope-slot__label {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    color: #4A4540;
}

.dark .branch-scope-slot__label {
    color: #4A4540;
}

.branch-scope-slot__control {
    position: relative;
    width: clamp(11rem, 28vw, 13.5rem);
    flex-shrink: 0;
}

.branch-scope-slot__select {
    display: block;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.375rem 2.375rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    color: #141414;
    background-color: #ffffff;
    border: 0;
    border-radius: 0.5rem;
    box-shadow:
        inset 0 0 0 1px #EDE4D8,
        0 1px 2px rgba(20, 20, 20, 0.04);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    outline: none;
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.125rem 1.125rem;
    /* Chevron-down */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236B6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.branch-scope-slot__select:hover {
    box-shadow:
        inset 0 0 0 1px #DBCDB8,
        0 1px 3px rgba(20, 20, 20, 0.08);
}

.branch-scope-slot__select:focus-visible {
    box-shadow:
        inset 0 0 0 1px rgba(255, 93, 1, 0.55),
        0 0 0 2px rgba(255, 93, 1, 0.22);
}

.dark .branch-scope-slot__select {
    color: #141414;
    background-color: #ffffff;
    box-shadow:
        inset 0 0 0 1px #EDE4D8,
        0 1px 2px rgba(20, 20, 20, 0.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236B6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.dark .branch-scope-slot__select:hover {
    box-shadow:
        inset 0 0 0 1px #DBCDB8,
        0 1px 3px rgba(20, 20, 20, 0.08);
}

.dark .branch-scope-slot__select:focus-visible {
    box-shadow:
        inset 0 0 0 1px rgba(255, 93, 1, 0.55),
        0 0 0 2px rgba(255, 93, 1, 0.22);
}

nav.fi-topbar .branch-scope-slot,
.fi-topbar-start .branch-scope-slot {
    position: relative;
    top: auto;
    inset-inline-start: auto;
    border-inline-start-color: #EDE4D8;
}

@media (max-width: 639px) {
    .branch-scope-slot__label {
        display: none;
    }

    .branch-scope-slot {
        gap: 0.375rem;
        margin-inline-start: 0.5rem;
        padding-inline-start: 0.5rem;
        border-inline-start: none;
    }

    .branch-scope-slot__control {
        width: min(calc(100vw - 5rem), 14rem);
    }
}
