/* ================================================================
   FriendsByChance — components/wheel-picker.css
   FBC.ui.WheelPicker (.fbc-wheel-* namespace).

   ⚠ .fbc-wheel-item height MUST stay in sync with ITEM_H in
   wheel-picker.js — the snap arithmetic is in pixels.
   ================================================================ */

.fbc-wheel-row {
    display:         flex;
    flex-wrap:       wrap;          /* date wheels and time wheels stack on a phone */
    gap:             10px;
    justify-content: center;
    align-items:     flex-start;
}

.fbc-wheel {
    display:        flex;
    flex-direction: column;
    align-items:    stretch;
    flex:           1 1 92px;
    min-width:      82px;
    max-width:      150px;
}

.fbc-wheel-label {
    font-size:      0.7rem;
    font-weight:    700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color:          var(--color-text-secondary);
    text-align:     center;
    margin-bottom:  4px;
}

.fbc-wheel-arrow {
    min-height:    38px;
    border:        1px solid var(--color-divider);
    background:    var(--color-surface);
    color:         var(--color-primary);
    cursor:        pointer;
    font-size:     0.8rem;
    line-height:   1;
    user-select:   none;
    border-radius: 8px 8px 0 0;
}
.fbc-wheel .fbc-wheel-arrow:last-child { border-radius: 0 0 8px 8px; }
.fbc-wheel-arrow:hover { background: var(--color-hover); }

/* The scrolling window: exactly 5 items tall, the middle one selected. */
.fbc-wheel-viewport {
    height:       220px;           /* 5 × 44px */
    overflow-y:   auto;
    border-left:  1px solid var(--color-divider);
    border-right: 1px solid var(--color-divider);
    background:   var(--color-bg);
    position:     relative;
    scrollbar-width: none;
    touch-action: none;            /* we drive the scroll from pointer events */
    overscroll-behavior: contain;
}
.fbc-wheel-viewport::-webkit-scrollbar { display: none; }

/* Marks the centre slot so the selected row reads as "chosen". */
.fbc-wheel-viewport::before {
    content:    '';
    position:   sticky;
    display:    block;
    top:        88px;              /* 2 × 44px */
    height:     44px;
    margin-bottom: -44px;
    background: var(--color-selected);
    pointer-events: none;
    z-index:    0;
}

.fbc-wheel-list { position: relative; z-index: 1; }

/* Two items of padding top and bottom so the first and last value can
   reach the centre slot. */
.fbc-wheel-pad { height: 88px; }

.fbc-wheel-item {
    height:          44px;         /* ⚠ keep in sync with ITEM_H */
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       0.95rem;
    color:           var(--color-text-secondary);
    cursor:          pointer;
    user-select:     none;
    white-space:     nowrap;
}
.fbc-wheel-item:hover { color: var(--color-text); }
.fbc-wheel-item--selected {
    color:       var(--color-text);
    font-weight: 700;
    font-size:   1.05rem;
}

/* The field under a wheel: its value, which can also be typed (see the
   header of wheel-picker.js). */
.fbc-wheel-input {
    margin-top:    6px;
    width:         100%;
    min-height:    34px;
    padding:       4px 6px;
    border:        1px solid var(--color-divider);
    border-radius: 6px;
    background:    var(--color-input-bg);
    color:         var(--color-text);
    font:          inherit;
    font-size:     0.9rem;
    text-align:    center;
}
.fbc-wheel-input:focus { outline: 2px solid var(--color-primary-light); outline-offset: 0; }
.fbc-wheel-input--invalid {
    border-color: var(--color-danger);
    outline-color: var(--color-danger);
}

/* What was refused, under the wheels — empty takes no room. */
.fbc-wheel-error {
    margin-top: 8px;
    min-height: 0;
    color:      var(--color-danger);
    font-size:  0.85rem;
    text-align: center;
}
.fbc-wheel-error:empty { display: none; }
