/* ─────────────────────────────────────────────────────────────────────────
   Mobile-First List Pattern Library
   ─────────────────────────────────────────────────────────────────────────
   Kullanım: admin/depo liste sayfalarında.

   Pattern: mobilde kart (d-md-none .mobile-list), desktop'ta tablo
   (d-none d-md-block). Long-press veya checkbox ile çoklu seçim;
   slide-up bottom bar (.multiselect-bar) ile toplu işlem.

   Bkz: public/assets/js/multiselect.js
   ───────────────────────────────────────────────────────────────────────── */

/* — MOBİL KART LİSTE — */
.mobile-list {
    padding: 0;
}

.mobile-card {
    background: #fff;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: .5rem;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: background .15s ease-out, box-shadow .15s ease-out;
    -webkit-tap-highlight-color: transparent;
}

.mobile-card .card-title {
    font-weight: 600;
    margin: 0 0 4px;
    font-size: .95rem;
}

.mobile-card .card-meta {
    color: var(--bs-secondary-color, #6c757d);
    font-size: .82rem;
    line-height: 1.45;
}

.mobile-card .card-meta .meta-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.mobile-card .card-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-card .card-actions .btn {
    min-height: 40px;
    font-size: .875rem;
}

/* — SEÇİLEBİLİR KART — */
.selectable-card {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

.selectable-card.is-selected {
    background: rgba(13, 110, 253, .08);
    box-shadow: inset 0 0 0 2px var(--bs-primary, #0d6efd);
}

.selectable-card.is-selected::before {
    content: "\F26B"; /* bi-check-circle-fill */
    font-family: "bootstrap-icons";
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--bs-primary, #0d6efd);
    font-size: 1.25rem;
    line-height: 1;
}

.mobile-list.selection-mode .selectable-card:not(.is-selected) {
    opacity: .85;
}

/* — SLIDE-UP BOTTOM BAR — */
.multiselect-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, .08);
    padding: 12px 16px;
    z-index: 1055;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(110%);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

.multiselect-bar.show {
    transform: translateY(0);
    pointer-events: auto;
}

.multiselect-bar .count-badge {
    background: var(--bs-primary, #0d6efd);
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: .9rem;
    min-width: 36px;
    text-align: center;
}

.multiselect-bar .bar-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.multiselect-bar .btn {
    min-height: 40px;
    padding: 0 14px;
}

/* — DESKTOP TABLO MULTISELECT (checkbox kolonu) — */
.table-multiselect tbody tr.is-selected {
    background-color: rgba(13, 110, 253, .08);
}

.table-multiselect th.col-multiselect,
.table-multiselect td.col-multiselect {
    width: 40px;
    text-align: center;
}

/* — STOK EKSİK / NEGATİF HIGHLIGHT — */
.stock-row-deficit {
    background-color: rgba(220, 53, 69, .08) !important;
}

.stock-row-deficit td {
    color: var(--bs-danger, #dc3545);
    font-weight: 500;
}

.stock-card-deficit {
    background-color: rgba(220, 53, 69, .06);
    border-color: rgba(220, 53, 69, .4);
}

.stock-deficit-banner {
    background: rgba(220, 53, 69, .1);
    border-left: 4px solid var(--bs-danger, #dc3545);
    padding: 12px 16px;
    border-radius: .25rem;
    margin-bottom: 16px;
}

/* — STICKY ÜST PANEL (filtre formu) — */
.sticky-list-header {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #fff;
    padding-top: 8px;
    padding-bottom: 8px;
    margin: -8px 0 12px;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/* — DURUM CHIPS — */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.4;
}
.status-chip.status-pending  { background: rgba(255, 193, 7, .15); color: #997404; }
.status-chip.status-done     { background: rgba(25, 135, 84, .15); color: #146c43; }
.status-chip.status-skipped  { background: rgba(108, 117, 125, .15); color: #495057; }
.status-chip.status-archived { background: rgba(108, 117, 125, .12); color: #6c757d; }

/* — ALT BOŞLUK (multiselect-bar altta sabit olunca son satır kapanmasın) — */
.has-multiselect-bar { padding-bottom: 88px; }

@media (min-width: 768px) {
    .has-multiselect-bar { padding-bottom: 72px; }
}
