/* ============================================================
   Order — icon select component
   Hybrid: native <select> kept under the hood + custom visual UI.
   Used on /order to replace plain selects with icon-rich dropdowns.
   ============================================================ */

.ois {
    position: relative;
}
.ois-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}
.ois-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--v3-bg-white, #fff);
    border: 1.5px solid var(--v3-border, #e5e7eb);
    border-radius: var(--v3-radius-input, 8px);
    cursor: pointer;
    font-size: 15px;
    color: var(--v3-text-heading, #111827);
    text-align: left;
    transition: border-color 160ms var(--v3-ease, ease);
    font-family: inherit;
    line-height: 1.4;
    min-height: 48px;
}
.ois-trigger:hover {
    border-color: var(--v3-orange, #ff6e1e);
}
.ois-trigger[aria-expanded="true"] {
    border-color: var(--v3-orange, #ff6e1e);
    box-shadow: 0 0 0 3px rgba(255, 110, 30, 0.12);
}
.ois-trigger:focus-visible {
    outline: 2px solid var(--v3-orange, #ff6e1e);
    outline-offset: 2px;
}
.ois-trigger.is-placeholder .ois-current-text {
    color: var(--v3-text-muted, #6b7280);
}

.ois-icon {
    flex-shrink: 0;
    width: 40px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--v3-text-heading, #111827);
}
.ois-icon:empty {
    display: none;
}
.ois-icon > .ois-swatch {
    width: 28px;
    height: 28px;
}
.ois-icon > .ois-mat {
    width: 100%;
    height: 100%;
}
.ois-icon svg {
    width: 100%;
    height: 100%;
    max-width: 36px;
    max-height: 30px;
}

.ois-current-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ois-chevron {
    flex-shrink: 0;
    color: var(--v3-text-body, #4b5563);
    transition: transform 160ms var(--v3-ease, ease);
}
.ois-trigger[aria-expanded="true"] .ois-chevron {
    transform: rotate(180deg);
}

.ois-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 6px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 320px;
    overflow-y: auto;
    background: var(--v3-bg-white, #fff);
    border: 1px solid var(--v3-border, #e5e7eb);
    border-radius: var(--v3-radius-input, 8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 160ms var(--v3-ease, ease), transform 160ms var(--v3-ease, ease);
}
.ois.is-open .ois-list {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.ois-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--v3-text-heading, #111827);
    transition: background 120ms var(--v3-ease, ease);
}
.ois-option:hover,
.ois-option.is-highlighted {
    background: rgba(255, 110, 30, 0.08);
}
.ois-option.is-selected {
    background: rgba(255, 110, 30, 0.14);
    font-weight: 600;
}
.ois-option .ois-icon {
    width: 44px;
    height: 36px;
}

/* ============================================================
   Color swatches
   ============================================================ */
.ois-swatch {
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}
.ois-swatch-color {
    background: conic-gradient(from 0deg, #00b3ff, #ffd700, #ff3399, #00b3ff);
}
.ois-swatch-bw {
    background: linear-gradient(135deg, #111 0 50%, #fff 50% 100%);
}
.ois-swatch-transparent {
    background-image:
        linear-gradient(45deg, #d1d5db 25%, transparent 25%),
        linear-gradient(-45deg, #d1d5db 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d1d5db 75%),
        linear-gradient(-45deg, transparent 75%, #d1d5db 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0;
    background-color: #f3f4f6;
}

/* ============================================================
   Material textures
   ============================================================ */
.ois-mat {
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
}
.ois-mat-paper {
    background: #fafafa;
    background-image: repeating-linear-gradient(0deg, transparent 0 6px, rgba(0,0,0,0.04) 6px 7px);
}
.ois-mat-film {
    background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 50%, #ffffff 100%);
}
.ois-mat-film-color {
    background: linear-gradient(135deg, #fde68a 0%, #fca5a5 35%, #c4b5fd 70%, #93c5fd 100%);
}
.ois-mat-tfilm {
    background-image:
        linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0)),
        linear-gradient(45deg, #d1d5db 25%, transparent 25%),
        linear-gradient(-45deg, #d1d5db 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d1d5db 75%),
        linear-gradient(-45deg, transparent 75%, #d1d5db 75%);
    background-size: auto, 10px 10px, 10px 10px, 10px 10px, 10px 10px;
    background-position: 0 0, 0 0, 0 5px, 5px -5px, -5px 0;
    background-color: #f9fafb;
}
.ois-mat-wine {
    background: linear-gradient(135deg, #fbf2e6 0%, #efd9b7 100%);
    background-image:
        radial-gradient(circle at 30% 30%, rgba(120, 53, 15, 0.08) 0 2px, transparent 2px),
        radial-gradient(circle at 70% 60%, rgba(120, 53, 15, 0.08) 0 2px, transparent 2px),
        radial-gradient(circle at 50% 80%, rgba(120, 53, 15, 0.08) 0 2px, transparent 2px),
        linear-gradient(135deg, #fbf2e6 0%, #efd9b7 100%);
}
