/* BissoPos — Masaüstü Hızlı Satış (prototip 1:1, sistem fontu) */
/* Mobil dokunulmaz: tüm kurallar @media (min-width:769px) */

@media (min-width: 769px) {
  :root {
    --bp-hs-bg: #f2f5fa;
    --bp-hs-panel: #fff;
    --bp-hs-ink: #212529;
    --bp-hs-muted: #8a98ac;
    --bp-hs-line: #e7ebf2;
    --bp-hs-blue: #0080ff;
    --bp-hs-green: #18d26b;
    --bp-hs-cyan: #00b8d4;
    --bp-hs-orange: #ffa800;
    --bp-hs-red: #ff3f3f;
    --bp-hs-chip: #eceff1;
    --bp-hs-bisso: #3597ab;
    --bp-hs-shadow: 0 1px 3px rgba(18, 38, 63, 0.08), 0 1px 2px rgba(18, 38, 63, 0.04);
  }

  .module-container:has(.bp-pos),
  .module-content:has(.bp-pos),
  #contentArea:has(.bp-pos) {
    background: var(--bp-hs-bg) !important;
  }

  .bp-pos-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
    gap: 14px;
    background: var(--bp-hs-bg);
    overflow: auto;
  }

  .bp-pos {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    min-height: calc(100vh - 80px);
    width: 100%;
    font-size: 14px;
    color: var(--bp-hs-ink);
    overflow: visible !important;
  }

  .bp-pos-top,
  .bp-pos-body {
    display: grid;
    grid-template-columns: 862px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
  }

  .bp-pos-body {
    flex: 1;
    min-height: 0;
  }

  .bp-l,
  .bp-r,
  .bp-toolbar,
  .bp-summary-cards {
    background: var(--bp-hs-panel);
    border: 1px solid var(--bp-hs-line);
    border-radius: 8px;
    box-shadow: var(--bp-hs-shadow);
  }

  .bp-l {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    width: 862px;
    max-width: 862px;
    height: 100%;
  }

  .bp-r {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  /* Barkod satırı */
  .bp-toolbar {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    height: 56px;
    overflow: visible;
    border-bottom: 0;
    background: var(--bp-hs-panel);
  }
  .bp-toolbar select {
    height: 100%;
    border: 0;
    border-right: 1px solid var(--bp-hs-line);
    border-radius: 8px 0 0 8px;
    padding: 0 14px;
    font-weight: 700;
    font-size: 12px;
    color: #64748b;
    background: #fafbfd;
    min-width: 110px;
  }
  .bp-toolbar .bp-barkod-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
    height: 100%;
  }
  .bp-toolbar input.barkod {
    width: 100%;
    height: 100%;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 16px !important;
    font-size: 15px;
    outline: none;
    background: #fff;
  }
  .bp-toolbar .bp-btn {
    height: 100%;
    border-radius: 0;
    padding: 0 16px;
    min-width: 56px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    box-shadow: none !important;
    font-size: 12px;
  }
  .bp-toolbar .bp-btn.ara {
    background: #eef2f7;
    color: #475569;
    width: 48px;
    min-width: 48px;
    border-right: 1px solid var(--bp-hs-line);
  }
  .bp-toolbar .bp-btn.okut { background: var(--bp-hs-blue); color: #fff; }
  .bp-toolbar .bp-btn.fg { background: var(--bp-hs-green); color: #fff; }
  .bp-toolbar .bp-btn.fg.on { filter: brightness(0.92); }
  .bp-toolbar .bp-btn.yzd {
    background: var(--bp-hs-orange);
    color: #fff;
    min-width: 118px;
    border-radius: 0 8px 8px 0;
  }
  .bp-toolbar .bp-btn.oe {
    display: none; /* ödeme ekle sağ panelde/ödeme tiplerinde */
  }
  .bp-yzd-wrap { position: relative; height: 100%; }
  .bp-yzd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 252px;
    background: #fff;
    border: 1px solid var(--bp-hs-line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(18, 38, 63, 0.18);
    padding: 6px;
    z-index: 4000;
    margin-top: 0;
  }
  .bp-yzd-menu.open,
  .bp-yzd-wrap:hover .bp-yzd-menu { display: block; }
  .bp-yzd-menu-h {
    font-size: 11px;
    font-weight: 800;
    color: var(--bp-hs-muted);
    text-transform: uppercase;
    padding: 6px 10px 4px;
  }
  .bp-yzd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .bp-yzd-item:hover { background: #f1f5fb; }
  .bp-yzd-item i { width: 16px; color: var(--bp-hs-bisso); }
  .bp-yzd-item.wa i { color: #25d366; }
  .bp-yzd-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
  }
  .bp-switch {
    width: 34px;
    height: 18px;
    border-radius: 20px;
    background: #cbd5e1;
    position: relative;
    flex: 0 0 34px;
  }
  .bp-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: 0.15s;
  }
  .bp-switch.on { background: var(--bp-hs-green); }
  .bp-switch.on::after { left: 18px; }

  /* KPI üst sağ */
  .bp-summary-cards {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0;
  }
  .bp-card {
    background: var(--bp-hs-panel);
    border: 1px solid var(--bp-hs-line);
    border-radius: 8px;
    box-shadow: var(--bp-hs-shadow);
    padding: 6px 18px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 56px;
  }
  .bp-card .lbl {
    font-size: 12px;
    color: var(--bp-hs-muted);
    font-weight: 600;
    margin: 0;
  }
  .bp-card .val {
    font-size: 28px !important;
    font-weight: 800;
    line-height: 1.1;
  }
  .bp-card.odenen .val,
  .bp-card.odenen input.val { color: #334155 !important; }
  .bp-card.tutar .val { color: var(--bp-hs-red) !important; }
  .bp-card.parausu .val { color: var(--bp-hs-green) !important; }
  .bp-card input.val {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    outline: none;
    padding: 0;
    font-size: 28px;
    font-weight: 800;
  }

  /* Sepet başlık / sekmeler */
  .bp-msfilters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: #fff;
    border-bottom: 1px solid var(--bp-hs-line);
  }
  .bp-msfilters .bp-title {
    font-weight: 800;
    font-size: 15px;
  }
  .bp-msfilters .bp-title b { color: var(--bp-hs-bisso); margin-left: 6px; }
  .bp-msfilters .bp-mini {
    height: 32px;
    border: 1px solid var(--bp-hs-line);
    border-radius: 6px;
    background: #fafbfd;
    display: flex;
    align-items: center;
    overflow: hidden;
  }
  .bp-msfilters .bp-mini input {
    border: 0;
    outline: none;
    background: none;
    padding: 0 10px;
    width: 110px;
    font-size: 12px;
  }
  .bp-msbar {
    display: flex;
    border-bottom: 1px solid var(--bp-hs-line);
    overflow-x: auto;
    background: #fff;
    padding: 0;
    gap: 0;
  }
  .bp-mstab {
    flex: 0 0 auto;
    padding: 11px 16px;
    background: transparent;
    border-radius: 0;
    border-right: 0;
    border-bottom: 3px solid transparent;
    color: var(--bp-hs-muted);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
  }
  .bp-mstab.aktif {
    color: var(--bp-hs-green);
    border-bottom-color: var(--bp-hs-green);
    background: #f4fdf8;
  }

  /* Sepet tablosu — BenimPOS 862px kolonlar */
  .bp-cart-table-wrap {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
  }
  .bp-cart-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  .bp-cart-table col.c-del { width: 60px; }
  .bp-cart-table col.c-urun { width: 250px; }
  .bp-cart-table col.c-isk { width: 107px; }
  .bp-cart-table col.c-mik { width: 175px; }
  .bp-cart-table col.c-fyt { width: 110px; }
  .bp-cart-table col.c-ttl { width: 110px; }
  .bp-cart-table col.c-kdv { width: 50px; }
  .bp-cart-table thead th {
    font-size: 12px;
    color: var(--bp-hs-muted);
    font-weight: 700;
    text-align: left;
    padding: 6px;
    border-bottom: 1px solid var(--bp-hs-line);
    background: #fafbfd;
  }
  .bp-cart-table thead th.r,
  .bp-cart-table tbody td.r { text-align: right; }
  .bp-cart-table thead th.c,
  .bp-cart-table tbody td.c { text-align: center; }
  .bp-cart-table tbody tr.bp-row {
    height: 72px;
    display: table-row;
    background: #fff;
    grid-template-columns: none;
    padding: 0;
    border-bottom: 0;
    align-items: stretch;
  }
  .bp-cart-table tbody td {
    padding: 6px;
    border-bottom: 1px solid #f1f4f9;
    font-size: 13px;
    vertical-align: middle;
  }
  .bp-tbody {
    overflow: visible !important;
    max-height: none;
    background: #fff;
  }
  .bp-cart-table-wrap .bp-tbody-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .bp-row .silbtn,
  .bp-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 29px;
    background: rgba(255, 63, 63, 0.1);
    color: var(--bp-hs-red);
    border: 0;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
  }
  .bp-del:hover,
  .bp-row .silbtn:hover { background: rgba(255, 63, 63, 0.2); }
  .bp-ucell { overflow: hidden; }
  .bp-pcode {
    font-size: 11px;
    color: var(--bp-hs-muted);
    font-weight: 600;
  }
  .bp-pname {
    font-weight: 700;
    position: relative;
    display: inline-block;
    line-height: 1.25;
    max-width: 238px;
    cursor: pointer;
  }
  .bp-pname:hover { color: #1d4ed8; }
  .bp-cost-tip {
    display: none; /* JS position:fixed ile gösterir */
  }
  .bp-row .iskbox {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    color: var(--bp-hs-muted);
  }
  .bp-row .iskbox button {
    border: 0;
    background: transparent;
    color: #64748b;
    padding: 2px;
    cursor: pointer;
    font-size: 13px;
  }
  .bp-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .bp-qty button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    font-size: 15px;
  }
  .bp-qty button.minus { background: #fde8e8; color: var(--bp-hs-red); }
  .bp-qty button.plus { background: #e3f9ee; color: var(--bp-hs-green); }
  .bp-qty input {
    width: 44px;
    height: 28px;
    border: 1px solid var(--bp-hs-line);
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
  }
  .bp-row .fiyat,
  .bp-cart-table .fiyat {
    width: 92px;
    height: 30px;
    border: 1px solid var(--bp-hs-line);
    border-radius: 6px;
    text-align: right;
    padding: 0 8px;
    font-weight: 700;
  }
  .bp-row .tutar,
  .bp-cart-table .ttl {
    font-weight: 800;
  }
  .bp-kdv { font-size: 12px; color: #64748b; font-weight: 700; }

  /* Sağ panel */
  .bp-cari-box {
    border-radius: 0;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--bp-hs-line);
    padding: 0;
  }
  .bp-cari-row {
    padding: 11px 14px;
    background: #f7f9fc;
    border-bottom: 1px solid var(--bp-hs-line);
  }
  .bp-cari-row input {
    height: 36px !important;
  }
  .bp-tar-row {
    background: var(--bp-hs-chip);
    color: #5b6b80;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
  }
  .bp-quick {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--bp-hs-line);
    margin: 0;
    border-radius: 0;
  }
  .bp-quick button {
    border: 0;
    border-radius: 0;
    background: #eef2f7;
    color: #475569;
    font-weight: 700;
    padding: 11px 0;
    height: auto;
    font-size: 14px;
  }
  .bp-quick button.plus,
  .bp-quick button.minus { color: var(--bp-hs-bisso); }

  .bp-pay-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 12px;
  }
  .bp-pay {
    height: 80px !important;
    min-height: 80px;
    border-radius: 3px !important;
    box-shadow: none !important;
    font-size: 15px;
    gap: 4px;
  }
  .bp-pay.nakit { background: var(--bp-hs-green) !important; }
  .bp-pay.pos { background: var(--bp-hs-cyan) !important; }
  .bp-pay.acik { background: var(--bp-hs-orange) !important; }
  .bp-pay.parcali { background: var(--bp-hs-blue) !important; }
  .bp-pay.diger { background: var(--bp-hs-red) !important; }
  .bp-pay .num { font-size: 11px; opacity: 0.92; }

  #bpSonSatisKodu {
    display: none !important; /* prototipte yok; yaz menüsünde küçük durum */
  }

  .bp-aksiyon-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 12px;
    margin: 0;
    border-top: 1px solid var(--bp-hs-line);
    border-bottom: 0;
  }
  .bp-ak-btn {
    height: 46px;
    border: 1px solid var(--bp-hs-line);
    background: #fff;
    border-radius: 6px;
  }

  .bp-kat-bar {
    display: none !important;
  }
  .bp-gset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: #f7f9fc;
    border-bottom: 1px solid var(--bp-hs-line);
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    flex-shrink: 0;
  }
  .bp-gset .bp-kat {
    flex: 0 0 auto;
    height: 36px;
    min-width: auto;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff !important;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .bp-gset .bp-gset-lab {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-left: 4px;
  }
  .bp-gset select {
    flex: 1 1 120px;
    min-width: 110px;
    max-width: 200px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    border: 1px solid var(--bp-hs-line);
    border-radius: 6px;
    padding: 7px 8px;
    background: #fff;
    cursor: pointer;
  }

  .bp-urun-listesi {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px;
    padding: 12px;
    /* ~3 satır (~12 ürün) görünür; kalanı fare ile scroll */
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    align-content: start;
    -webkit-overflow-scrolling: touch;
  }
  .bp-urun-listesi .bp-urun-card {
    min-height: 78px;
    height: auto;
  }
  .bp-urun-card {
    height: auto !important;
    min-height: 88px;
    border: 1px solid var(--bp-hs-line);
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    background: #fff;
  }
  .bp-urun-card:hover {
    border-color: #4fb3c6;
    box-shadow: var(--bp-hs-shadow);
    transform: translateY(-1px);
  }
  .bp-urun-card .ad {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    min-height: 30px;
    color: #334155;
  }
  .bp-urun-card .fy {
    color: var(--bp-hs-bisso);
    font-weight: 800;
    font-size: 15px;
    margin-top: 6px;
  }
  .bp-urun-card .stk {
    font-size: 10px;
    color: var(--bp-hs-muted);
    margin-top: 2px;
  }

  /* Genel Toplam satırı yok */
  .bp-genel-toplam,
  .bp-footer-toplam { display: none !important; }
}

/* Floating maliyet tip (overflow kırpmaz) */
#bpCostTipFloat {
  position: fixed;
  z-index: 100050;
  background: #0f2740;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(18, 38, 63, 0.2);
  display: none;
}
#bpCostTipFloat::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -4px;
  width: 8px;
  height: 8px;
  background: #0f2740;
  transform: rotate(45deg);
}
