/* Yavuz Plastik Stok v1.6.0 — kamera, canlı bildirim ve responsive kullanım katmanı */
:root{
  --ypbs-petrol:#205058;
  --ypbs-petrol-dark:#173f46;
  --ypbs-turquoise:#79d8d0;
  --ypbs-blue:#0c66e4;
  --ypbs-blue-dark:#06376d;
}

body.ypbs-standalone,body.ypbs-standalone *{letter-spacing:normal;text-shadow:none}
body.ypbs-standalone h1,body.ypbs-standalone h2,body.ypbs-standalone h3{font-weight:500}
body.ypbs-standalone strong,body.ypbs-standalone b{font-weight:600}
body.ypbs-standalone button,body.ypbs-standalone a{font-weight:500}

/* Dokunmatik kullanım ve okunabilirlik */
@media (pointer:coarse){
  body.ypbs-standalone button,body.ypbs-standalone a[role=button]{min-height:44px}
  body.ypbs-standalone input,body.ypbs-standalone select,body.ypbs-standalone textarea{font-size:17px;line-height:1.4}
  .row-actions button{min-width:42px}
}

.ypbs-camera-field{position:relative}
.ypbs-camera-field input{padding-right:164px!important}
.ypbs-camera-field>small{right:104px!important}
.ypbs-camera-inline{position:absolute;z-index:4;right:9px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:6px;min-height:42px;padding:7px 11px;border:1px solid #88b7f3;border-radius:10px;background:#edf6ff;color:#0758ae;font-size:11px;font-weight:500;box-shadow:none}
.ypbs-camera-inline:hover{background:#e1efff;border-color:#4a91ed}
.ypbs-camera-inline span{font-size:17px;line-height:1}
.ypbs-camera-inline b{font-size:10px}
.ypbs-scan-filled{border-color:#16a26d!important;box-shadow:0 0 0 4px rgba(22,162,109,.12)!important}

.ypbs-camera-fab{position:fixed;z-index:230;right:20px;bottom:20px;display:flex;align-items:center;gap:9px;min-height:52px;padding:10px 17px;border:1px solid rgba(255,255,255,.35);border-radius:999px;background:linear-gradient(135deg,#06376d,#0c66e4);color:#fff;box-shadow:0 14px 30px rgba(4,48,96,.24)}
.ypbs-camera-fab span{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;background:rgba(255,255,255,.16);font-size:18px}
.ypbs-camera-fab b{font-size:12px;white-space:nowrap}
.ypbs-camera-fab:focus-visible{outline:3px solid rgba(12,102,228,.25);outline-offset:3px}

body.ypbs-camera-open{overflow:hidden}
.ypbs-camera-backdrop{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:18px;background:rgba(1,16,39,.78);overflow:auto}
.ypbs-camera-modal{width:min(920px,100%);max-height:calc(100dvh - 36px);overflow:auto;border:1px solid #cbdceb;border-radius:20px;background:#fff;color:#10243d;box-shadow:0 30px 80px rgba(0,16,44,.34)}
.ypbs-camera-head{position:sticky;top:0;z-index:6;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 22px;border-bottom:1px solid #dbe5f0;background:#fff}
.ypbs-camera-head>div>span{display:block;margin-bottom:3px;color:#0c66e4;font-size:9px;font-weight:600;letter-spacing:.7px}
.ypbs-camera-head h2{margin:0;color:#062f5d;font-size:22px;line-height:1.25}
.ypbs-camera-head p{margin:5px 0 0;color:#6b7a90;font-size:11px}
.ypbs-camera-close{width:42px;height:42px;min-height:42px;border:0;border-radius:11px;background:#eff4f9;color:#53657b;font-size:27px;line-height:1}
.ypbs-camera-body{display:grid;gap:14px;padding:20px 22px 24px}
.ypbs-camera-stage{position:relative;overflow:hidden;aspect-ratio:16/9;min-height:310px;border-radius:16px;background:#03152e}
.ypbs-camera-stage video{display:block;width:100%;height:100%;object-fit:cover;background:#03152e}
.ypbs-camera-guide{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.ypbs-camera-guide span{width:min(76%,600px);height:38%;min-height:118px;border:2px solid rgba(255,255,255,.92);border-radius:18px;background:linear-gradient(90deg,transparent 49.5%,rgba(121,216,208,.75) 50%,transparent 50.5%);box-shadow:0 0 0 999px rgba(0,15,36,.25)}
.ypbs-camera-guide small{position:absolute;bottom:18px;padding:7px 12px;border-radius:999px;background:rgba(0,18,44,.74);color:#fff;font-size:10px}
.ypbs-camera-off{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:linear-gradient(145deg,#052a59,#061c3d);color:#fff}
.ypbs-camera-off[hidden]{display:none}
.ypbs-camera-off b{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:#0c66e4;font-size:25px}
.ypbs-camera-off strong{font-size:16px}
.ypbs-camera-off small{color:#bdd4ee;font-size:10px}
.ypbs-camera-status{padding:11px 13px;border:1px solid #d7e3ee;border-radius:11px;background:#f6f9fc;color:#52657a;font-size:11px}
.ypbs-camera-status.is-success{border-color:#b9e6d3;background:#ecfaf4;color:#087a4e}
.ypbs-camera-status.is-warning{border-color:#f3d3a7;background:#fff7eb;color:#9b5b0b}
.ypbs-camera-controls{display:grid;grid-template-columns:1.35fr repeat(3,minmax(0,1fr));gap:9px}
.ypbs-camera-controls button{min-height:46px;font-size:11px}
.ypbs-camera-controls button:disabled{opacity:.48;cursor:not-allowed}
.ypbs-camera-controls .is-active{border-color:#e5a42c;background:#fff6df;color:#8d5b00}
.ypbs-camera-options{display:grid;grid-template-columns:1.25fr 1fr auto auto;gap:11px;align-items:end;padding:13px;border:1px solid #dce6f0;border-radius:13px;background:#f8fafc}
.ypbs-camera-options>label{display:grid;gap:5px;color:#52657a;font-size:9px}
.ypbs-camera-options select{min-height:43px;padding:9px 11px;font-size:13px}
.ypbs-camera-zoom input{min-height:43px;padding:0}
.ypbs-camera-zoom.is-disabled{opacity:.48}
.ypbs-camera-check{display:flex!important;align-items:center;gap:7px;min-height:43px;padding:0 10px;border:1px solid #d6e2ed;border-radius:10px;background:#fff;white-space:nowrap}
.ypbs-camera-check input{width:20px;height:20px;margin:0;accent-color:#0c66e4}
.ypbs-camera-check span{font-size:10px;color:#304258}
.ypbs-camera-alternatives{display:grid;grid-template-columns:.8fr 1.4fr;gap:10px}
.ypbs-camera-file{position:relative;display:flex;align-items:center;justify-content:center;min-height:48px;border:1px dashed #8db6e8;border-radius:11px;background:#f1f7ff;color:#0758ae;cursor:pointer}
.ypbs-camera-file input{position:absolute;width:1px;height:1px;opacity:0}
.ypbs-camera-file span{font-size:11px;font-weight:500}
.ypbs-camera-manual{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.ypbs-camera-manual input{min-height:48px;font-size:16px}
.ypbs-camera-manual button{min-width:92px;border:0;border-radius:10px;background:#0c66e4;color:#fff}
.ypbs-camera-result{display:none;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:15px;padding:15px;border:1px solid #c7def7;border-radius:13px;background:#f2f8ff}
.ypbs-camera-result.is-visible{display:grid}
.ypbs-camera-result small{display:block;color:#0c66e4;font-size:8px;font-weight:600;letter-spacing:.6px}
.ypbs-camera-result>div>strong{display:block;margin:2px 0;color:#062f5d;font-size:19px}
.ypbs-camera-result h3{margin:3px 0;color:#10243d;font-size:14px}
.ypbs-camera-result p{margin:0;color:#6b7a90;font-size:9px}
.ypbs-camera-result-actions{display:flex;gap:8px}
.ypbs-camera-result-actions button{min-height:44px;font-size:10px}
.ypbs-camera-toast,.ypbs-live-toast{position:fixed;z-index:11000;left:50%;bottom:28px;transform:translate(-50%,20px);max-width:min(520px,calc(100% - 30px));padding:12px 16px;border:1px solid #c9dced;border-radius:12px;background:#fff;color:#173f46;box-shadow:0 14px 35px rgba(2,27,61,.22);opacity:0;transition:.2s}
.ypbs-camera-toast.is-visible,.ypbs-live-toast.is-visible{transform:translate(-50%,0);opacity:1}
.ypbs-camera-toast.is-success{border-color:#a9ddc8;background:#ecfaf4;color:#087a4e}
.ypbs-camera-toast.is-warning{border-color:#efcf9f;background:#fff7eb;color:#92570e}

/* Canlı bildirim merkezi */
.ypbs-live-button{position:fixed;z-index:231;left:20px;bottom:20px;display:flex;align-items:center;gap:8px;min-height:50px;padding:9px 15px;border:1px solid #bed5e9;border-radius:999px;background:#fff;color:#06376d;box-shadow:0 12px 28px rgba(4,48,96,.16)}
.ypbs-live-button>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#eaf3ff;color:#0c66e4;font-size:15px;font-weight:600}
.ypbs-live-button>b{font-size:11px}
.ypbs-live-button>i{display:grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:999px;background:#d94b4b;color:#fff;font-size:9px;font-style:normal}
.ypbs-live-panel{position:fixed;z-index:10020;left:18px;bottom:82px;width:min(390px,calc(100% - 36px));max-height:min(690px,calc(100dvh - 110px));display:flex;flex-direction:column;border:1px solid #cbdbea;border-radius:18px;background:#fff;box-shadow:0 25px 70px rgba(0,20,48,.28);opacity:0;visibility:hidden;transform:translateY(14px);transition:.2s}
.ypbs-live-panel.is-open{opacity:1;visibility:visible;transform:none}
.ypbs-live-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:17px 18px;border-bottom:1px solid #dbe5f0;background:#f8fbff;border-radius:18px 18px 0 0}
.ypbs-live-panel header small{color:#0c66e4;font-size:8px;font-weight:600;letter-spacing:.7px}
.ypbs-live-panel header h2{margin:2px 0 3px;color:#062f5d;font-size:17px}
.ypbs-live-panel header p{margin:0;font-size:9px}
.ypbs-live-panel header p.is-online{color:#0a8a58}.ypbs-live-panel header p.is-offline{color:#b36b0c}
.ypbs-live-panel header button{width:38px;height:38px;border:0;border-radius:10px;background:#eaf0f6;color:#52657a;font-size:23px}
.ypbs-live-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px;border-bottom:1px solid #e1e9f1;background:#fff}
.ypbs-live-options label{display:flex;align-items:center;gap:7px;min-height:40px;padding:0 9px;border:1px solid #dae4ed;border-radius:9px;font-size:9px}
.ypbs-live-options input{width:18px;height:18px;margin:0;accent-color:#0c66e4}
.ypbs-live-options button{grid-column:1/-1;min-height:40px;border:1px solid #b9d3ee;border-radius:9px;background:#eef6ff;color:#0758ae;font-size:10px}
.ypbs-live-list{min-height:220px;overflow:auto;padding:8px 14px}
.ypbs-live-item{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;padding:11px 0;border-bottom:1px solid #edf1f5}
.ypbs-live-item>span{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#eaf3ff;color:#0c66e4;font-size:10px;font-weight:600}
.ypbs-live-item>span.is-whatsapp_click{background:#e7f9ef;color:#079755}
.ypbs-live-item>span.is-critical_stock{background:#fff1e0;color:#d97712}
.ypbs-live-item strong{display:block;color:#10243d;font-size:10px}
.ypbs-live-item p{margin:2px 0;color:#6b7a90;font-size:9px;line-height:1.45}
.ypbs-live-item small{color:#9aa7b6;font-size:8px}
.ypbs-live-empty{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#789;text-align:center}
.ypbs-live-empty b{color:#40546a;font-size:12px}.ypbs-live-empty span{font-size:9px}
.ypbs-live-panel>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border-top:1px solid #dfe8f0;background:#f8fafc;border-radius:0 0 18px 18px}
.ypbs-live-panel footer button{border:0;background:none;color:#0c66e4;font-size:9px}.ypbs-live-panel footer small{color:#8795a5;font-size:8px}
.ypbs-live-toast{display:flex;flex-direction:column;gap:2px;left:auto;right:20px;bottom:84px;transform:translateY(20px)}
.ypbs-live-toast.is-visible{transform:none}
.ypbs-live-toast b{font-size:11px}.ypbs-live-toast span{font-size:9px;color:#66778b}

/* Açık katalog canlı güncelleme bandı */
.ypbs-catalog-live-banner{position:fixed;z-index:500;top:14px;left:50%;transform:translate(-50%,-120%);display:flex;align-items:center;gap:18px;max-width:calc(100% - 28px);padding:10px 12px 10px 15px;border:1px solid #9fc8f0;border-radius:13px;background:#fff;box-shadow:0 14px 34px rgba(4,48,96,.18);transition:.25s}
.ypbs-catalog-live-banner.is-visible{transform:translate(-50%,0)}
.ypbs-catalog-live-banner span{display:flex;flex-direction:column}.ypbs-catalog-live-banner b{color:#06376d;font-size:10px}.ypbs-catalog-live-banner small{color:#63758b;font-size:8px}
.ypbs-catalog-live-banner button{min-height:38px;border:0;border-radius:9px;padding:7px 12px;background:#0c66e4;color:#fff;font-size:9px;white-space:nowrap}

/* Genel responsive güçlendirme */
@media(max-width:1180px){
  .pos-layout{grid-template-columns:minmax(0,1fr) minmax(330px,.75fr)}
  .pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stock-layout{grid-template-columns:1fr}
}
@media(max-width:780px){
  .ypbs-camera-fab{right:12px;bottom:12px;min-width:54px;width:54px;height:54px;padding:8px;border-radius:50%}
  .ypbs-camera-fab b{display:none}.ypbs-camera-fab span{width:36px;height:36px;background:transparent}
  .ypbs-live-button{left:12px;bottom:12px;width:52px;height:52px;min-height:52px;padding:7px;border-radius:50%}
  .ypbs-live-button>b{display:none}.ypbs-live-button>i{position:absolute;right:-3px;top:-3px}
  .ypbs-live-button>span{width:36px;height:36px}
  .ypbs-live-panel{left:10px;bottom:74px;width:calc(100% - 20px);max-height:calc(100dvh - 92px)}
  .ypbs-camera-backdrop{padding:0;place-items:stretch}
  .ypbs-camera-modal{width:100%;max-height:100dvh;min-height:100dvh;border:0;border-radius:0}
  .ypbs-camera-head{padding:14px 15px}.ypbs-camera-head h2{font-size:19px}.ypbs-camera-head p{font-size:9px}
  .ypbs-camera-body{padding:12px 13px 22px;gap:11px}
  .ypbs-camera-stage{min-height:250px;border-radius:13px}
  .ypbs-camera-controls{grid-template-columns:1fr 1fr}
  .ypbs-camera-options{grid-template-columns:1fr 1fr}
  .ypbs-camera-options>label:first-child,.ypbs-camera-options>.ypbs-camera-zoom{grid-column:1/-1}
  .ypbs-camera-alternatives{grid-template-columns:1fr}
  .ypbs-camera-result{grid-template-columns:1fr}.ypbs-camera-result-actions{display:grid;grid-template-columns:1fr 1fr}
  .ypbs-camera-field input{padding-right:72px!important}.ypbs-camera-field>small{display:none}
  .ypbs-camera-inline{right:7px;width:48px;justify-content:center;padding:6px}.ypbs-camera-inline b{display:none}
  .ypbs-live-toast{right:10px;left:10px;bottom:75px;max-width:none}
  .ypbs-camera-toast{bottom:76px}
  .table-wrap,.table-scroll,.data-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  table{min-width:720px}
}
@media(max-width:480px){
  .ypbs-camera-stage{min-height:220px;aspect-ratio:4/3}
  .ypbs-camera-guide span{width:84%;height:34%;min-height:92px}
  .ypbs-camera-controls button{font-size:9px;padding:8px}
  .ypbs-camera-options{grid-template-columns:1fr}.ypbs-camera-options>label{grid-column:auto!important}
  .ypbs-camera-check{justify-content:flex-start}
  .ypbs-camera-manual{grid-template-columns:1fr}.ypbs-camera-manual button{min-height:44px}
  .ypbs-catalog-live-banner{top:8px;gap:9px;width:calc(100% - 16px)}
}
@media(prefers-reduced-motion:reduce){
  .ypbs-camera-fab,.ypbs-live-button,.ypbs-camera-toast,.ypbs-live-toast,.ypbs-live-panel,.ypbs-catalog-live-banner{transition:none!important;animation:none!important}
}
