/* ═══════════════════════════════════════════════════
   Warehouse Selector — Frontend CSS v4
   آلفا مارکت — طراحی حرفه‌ای
   ═══════════════════════════════════════════════════ */

.whs-wrap {
    margin: 16px 0 20px;
    font-family: inherit;
    direction: rtl;
}

/* ── Header ──────────────────────────────────────── */
.whs-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: #6c3fe0;
    margin-bottom: 10px;
    letter-spacing: .01em;
    text-transform: uppercase;
}
.whs-head-icon {
    width: 15px;
    height: 15px;
    stroke: #6c3fe0;
    flex-shrink: 0;
}
.whs-head-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, transparent, #e0d4fb);
}
.whs-forced-tag {
    font-size: 10px;
    font-weight: 700;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 20px;
    padding: 2px 9px;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Options container ───────────────────────────── */
.whs-options {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* همیشه دو ستون — حتی موبایل */
    gap: 8px;
}

/* ── Single option ───────────────────────────────── */
.whs-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    background: #fff;
    border: 2px solid #e8e4f3;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .15s, background .18s;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    min-height: 90px;
}
.whs-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
}
.whs-opt:hover:not(.whs-opt--disabled) {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(108,63,224,.14);
    transform: translateY(-2px);
    background: #faf8ff;
}
.whs-opt--selected {
    border-color: #6c3fe0 !important;
    background: #f5f0ff !important;
    box-shadow: 0 6px 22px rgba(108,63,224,.2) !important;
    transform: translateY(-1px);
}

/* ── Disabled ────────────────────────────────────── */
.whs-opt--disabled {
    opacity: .4;
    cursor: not-allowed;
    background: #f9f9fb !important;
    filter: grayscale(.3);
}
.whs-opt--disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #e8e4f3 !important;
    background: #f9f9fb !important;
}

/* ── Icon area ───────────────────────────────────── */
.whs-opt-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f0ebff;
    border: 1.5px solid #ddd4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, border-color .18s;
    flex-shrink: 0;
}
.whs-opt--selected .whs-opt-icon-wrap {
    background: #6c3fe0;
    border-color: #5a32bc;
}
.whs-opt-svg {
    width: 22px;
    height: 22px;
    stroke: #6c3fe0;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .18s;
}
.whs-opt--selected .whs-opt-svg { stroke: #fff; }

/* ── Text ────────────────────────────────────────── */
.whs-opt-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}
.whs-opt-body strong {
    font-size: 13px;
    font-weight: 700;
    color: #1e1b4b;
    transition: color .15s;
    line-height: 1.2;
}
.whs-opt--selected .whs-opt-body strong { color: #6c3fe0; }
.whs-opt-body small {
    font-size: 10.5px;
    color: #b8aed4;
    line-height: 1.3;
}
.whs-opt--out .whs-opt-body small { color: #f87171; }

/* ── Check badge ─────────────────────────────────── */
.whs-opt-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #6c3fe0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(.3);
    transition: opacity .2s, transform .25s cubic-bezier(.34,1.56,.64,1);
}
.whs-opt-check svg {
    width: 11px; height: 11px;
    stroke: #fff;
    stroke-width: 2.5;
}
.whs-opt--selected .whs-opt-check {
    opacity: 1;
    transform: scale(1);
}

/* ── Mobile: اجبار به دو ستون ────────────────────── */
@media (max-width: 768px) {
    .whs-options {
        grid-template-columns: 1fr 1fr !important;
        gap: 7px;
    }
    .whs-opt {
        padding: 12px 8px;
        border-radius: 12px;
        min-height: 80px;
    }
    .whs-opt-icon-wrap {
        width: 38px; height: 38px;
        border-radius: 10px;
    }
    .whs-opt-svg { width: 19px; height: 19px; }
    .whs-opt-body strong { font-size: 12px; }
    .whs-opt-body small  { font-size: 10px; }
}
@media (max-width: 380px) {
    .whs-opt { padding: 10px 6px; min-height: 72px; }
    .whs-opt-icon-wrap { width: 34px; height: 34px; }
    .whs-opt-svg { width: 17px; height: 17px; }
    .whs-opt-body strong { font-size: 11.5px; }
    .whs-head { font-size: 11.5px; }
}
