/* "Bu ürün stokta yok" sayfası — mobilde bottom sheet, masaüstünde ortada modal.
 *
 * Neden: sepete eklenemeyen ürün bugüne kadar sadece bir hata toast'ı üretiyordu ve
 * talep kayboluyordu. Artık müşteriye "stoğa girince haber verelim mi?" diye SORULUYOR
 * (varsayılan AÇIK) ve isteği her hâlükârda ölçüme yazılıyor.
 *
 * Mobil davranış: alttan yükselir · sürükleyerek kapanır · backdrop'a dokununca kapanır ·
 * ESC kapatır · arka plan kaymaz (scroll lock) · odak içeride kalır · dokunma hedefi ≥44px.
 */

.oos-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(17, 23, 38, .45);
    opacity: 0;
    transition: opacity .18s ease;
}

.oos-sheet-backdrop.is-open { opacity: 1; }

.oos-sheet {
    box-sizing: border-box;        /* genislik padding'den bagimsiz kalsin */
    position: fixed;
    z-index: 1081;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary, #fff);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .18);
    padding: 8px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform .22s cubic-bezier(.22, 1, .36, 1);
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.oos-sheet.is-open { transform: translateY(0); }
.oos-sheet.is-dragging { transition: none; }

/* Sürükleme tutamacı — mobilde "bu aşağı çekilebilir" işareti */
.oos-sheet__grip {
    width: 44px;
    height: 5px;
    margin: 6px auto 14px;
    border-radius: 999px;
    background: var(--border-color, #d9dde3);
}

.oos-sheet__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary, #111726);
}

.oos-sheet__sub {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-tertiary, #70747d);
}

.oos-sheet__product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 12px;
    /* Cerceve yerine dolgu: cerceveli hali metin KUTUSU gibi gorunup
       "buraya yazacagim" yanilgisi yaratiyordu. */
    background: var(--bg-secondary, #f5f6f8);
    border-left: 3px solid var(--oyp-primary, #ffa104);
}

.oos-sheet__product img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex: 0 0 auto;
}

.oos-sheet__product-name {
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--text-primary, #111726);
    /* uzun parça adları taşmasın */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.oos-sheet__opt {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 2px;
    cursor: pointer;
    font-size: 14.5px;
    color: var(--text-primary, #111726);
    user-select: none;
}

.oos-sheet__opt input {
    width: 22px;
    height: 22px;
    accent-color: var(--oyp-primary, #ffa104);
    flex: 0 0 auto;
    cursor: pointer;
}

.oos-sheet__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }

.oos-sheet__primary {
    display: flex;                 /* <a> da <button> da ayni gorunsun */
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--oyp-primary, #ffa104);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}

.oos-sheet__primary:hover,
.oos-sheet__primary:focus { color: #fff; }

.oos-sheet__primary:hover { background: var(--oyp-primary-dark, #d88700); }
.oos-sheet__primary:disabled { opacity: .6; cursor: default; }

.oos-sheet__secondary {
    min-height: 44px;
    border: 0;
    background: none;
    color: var(--text-tertiary, #70747d);
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.oos-sheet__alt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-top: 8px;
    padding: 0 4px;
    border: 0;
    background: none;
    font-size: 14px;
    color: var(--oyp-primary-dark, #d88700);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

/* Onay ekrani — sheet kapanmadan once ne oldugunu soyler */
.oos-sheet__done {
    padding: 26px 4px;
    text-align: center;
    font-size: 14.5px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--oyp-success, #1a7f37);
}

.oos-sheet__note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-tertiary, #70747d);
}

/* Masaüstü: ortada modal */
@media (min-width: 576px) {
    .oos-sheet {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 50%;
        width: 440px;
        max-width: calc(100vw - 32px);
        border-radius: 16px;
        transform: translate(-50%, -46%) scale(.98);
        opacity: 0;
        transition: opacity .18s ease, transform .18s ease;
        padding: 18px 22px 22px;
    }

    .oos-sheet.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .oos-sheet__grip { display: none; }
}

/* Dark mode: onay yazisi koyu zeminde okunsun */
[data-theme="dark"] .oos-sheet__done { color: #4ade80; }
