/* P04: kasanın kendi sipariş kabuğu. H1 modal geçidi sınıfı açar/kapatır;
   bu dosya siparis-sade-kart ve siparis-shadcn stillerinden sonra kaydedilir.
   Yönetim ve 900 px altındaki ortak form kendi düzenini korur. */
.sip-internet-bilgi-seridi {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sip-internet-rakamlar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  order: -1;
  font-size: var(--y-14);
}
.sip-internet-rakam {
  display: flex;
  gap: 4px;
}
.sip-internet-rakam dd {
  margin: 0;
}
@media screen and (min-width: 901px) {
  /* Üst/alt çerçevenin 32 px'i başlığa katılır: üç satır bildirim ve 15 ürün birlikte sığar.
     Başlık bildirim yokken de aynı boydadır; sürüm ve işlem düğmeleri sağdaki alanda kalır. */
  html body.tezgah-pos #modal.pos-siparis-form-acik[open] {
    --sip-baslik-boy: 100px;
    --sip-bildirim-dar: 0;
    --sip-bildirim-ust: 22px;
    --sip-dar-baslik-boy: calc(160px + var(--sip-baslik-ek-boy, 0px));
    --sip-dar-bildirim-ust: 68px;
    --sip-dar-baslik-en: calc(100% - var(--pos-siparis-arac-en, 320px) - 100px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: calc(100vw - 32px);
    max-width: 1504px;
    height: 100vh;
    max-height: 100vh;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .dialog-top {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    flex: 0 0 var(--sip-baslik-boy);
    height: var(--sip-baslik-boy);
    min-height: var(--sip-baslik-boy);
    align-items: center;
    margin: 0;
    padding: 40px 10px 0 20px;
    pointer-events: auto;
    background: transparent;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik #modal-title {
    flex: none;
    width: max-content;
    position: var(--sip-baslik-konum, static);
    top: 24px;
    left: 20px;
    max-width: var(--sip-baslik-metin-en, 320px);
    white-space: normal;
    min-width: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik #modal-close { margin-left: auto; }
  html body.tezgah-pos #modal.pos-siparis-form-acik #modal-body {
    flex: 1 1 0;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-govde.sip-sube-adim {
    padding-top: 16px;
    grid-column: 1 / -1;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-kp {
    width: min(1400px, 100%);
  }
  /* Kasanın toplamı, eksikleri, Etiket ve Kaydet sağ özette birlikte kalır. */
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-d3 .sip-govde:not(.sip-sube-adim) { grid-row:1 / -1; padding-top:0; }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-d3.sip-internet-form .sip-govde { grid-row:2 / -1; }
  html body.tezgah-pos #modal.pos-siparis-form-acik > .deneme-pencere-isareti { top:0; left:0; right:0; width:auto; padding:4px 12px; line-height:1; }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-d3 {
    grid-template-columns: minmax(0, 576fr) minmax(0, 624fr) minmax(0, 304fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: 'ust bas ozet' 'sol not ozet' 'sol sag ozet' 'alt sag ozet';
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-d3::after {
    display: none;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-kopya-form .sip-govde > .sip-kopya-not { margin:0 0 12px; }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-d3.sip-internet-form {
    /* kisayol: kasa kabuğunun en/kenar ölçüsü; kabuk değişince araç ve kayıt birlikte güncellenir. */
    --sip-internet-form-en: min(1504px, calc(100vw - 32px));
    --sip-internet-form-sol: calc((100vw - var(--sip-internet-form-en)) / 2);
    grid-template-rows: auto auto auto minmax(min(360px, 30vh), 1fr) auto;
    grid-template-areas: 'internet internet internet' 'ust bas ozet' 'sol not ozet' 'sol sag ozet' 'alt sag ozet';
    overflow-y: auto;
  }
  /* İnternet formunda araçlar kayan gövdeden bağımsız, aynı sabit başlıkta kalır. */
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-form .sip-form-araclar {
    position: fixed;
    top: 0;
    left: auto;
    right: calc(var(--sip-internet-form-sol) + 72px);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-bant {
    grid-area: internet;
    height: max-content;
    min-width: 0;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--cizgi);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-bilgi-seridi {
    display: grid;
    flex-direction: row;
    grid-template-columns: minmax(0, 1fr) 576px;
    gap: 24px;
    align-items: start;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-bilgiler .note {
    margin: 0 0 4px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: var(--y-16);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-bilgiler .note::before {
    content: none;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-rakamlar {
    display: grid;
    flex-wrap: nowrap;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 12px;
    order: 0;
    font-size: var(--y-16);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-rakam {
    display: block;
    gap: 0;
    min-width: 0;
    padding: 0 16px;
    border-left: 1px solid var(--cizgi);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-rakam dt {
    color: var(--soluk);
    font-size: var(--y-14);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-rakam dd {
    margin: 4px 0 0;
    min-height: 30px;
    font-size: var(--y-24);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik [data-internet-deger='fark'][data-internet-farkli='true'] {
    font-size: var(--y-28);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-ozet {
    grid-area: ozet;
    display: flex;
    min-height: 0;
    min-width: 0;
    border-left: 1px solid var(--cizgi);
    background: var(--kagit);
  }
  /* Uzun internet bilgisi ana gövdede akar; kayıt tuşunun yeri o gövdenin kaymasına bağlı değildir. */
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-form .sip-form-ozet {
    position: sticky;
    top: 0;
    align-self: start;
    height: calc(100vh - var(--sip-baslik-boy));
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-form .sip-form-ozet .sip-serit {
    margin-bottom: 92px;
    max-height: calc(100vh - var(--sip-baslik-boy) - 92px);
    min-height: 0;
    overflow-y: auto;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-internet-form .sip-kaydet {
    position: fixed;
    right: calc(var(--sip-internet-form-sol) + 16px);
    bottom: 16px;
    width: calc(var(--sip-internet-form-en) * 304 / 1504 - 32px);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-ozet .sip-serit {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: static;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0 16px 16px;
    gap: 12px;
    border: 0;
  }
  /* Bilgi kendi içinde kayar; Etiket ve Kaydet kısa ekranda da sabit kalır. */
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-serit-yazi {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 12px;
    overflow-y: auto;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-serit-bildirim {
    display: block;
    width: 100%;
    flex: none;
    overflow: visible;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-ozet-baslik {
    margin: 0;
    color: var(--soluk);
    font-size: var(--y-14);
    font-weight: 700;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-musteri {
    overflow-wrap: anywhere;
    font-size: var(--y-16);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-musteri small {
    display: block;
    color: var(--soluk);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-toplam {
    order: 2;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid var(--cizgi);
    font-size: var(--y-28);
    font-weight: 700;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-toplam small {
    color: var(--soluk);
    font-size: var(--y-14);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-sepet {
    order: 1;
    margin: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-teslimat,
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-hazirlik {
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: var(--y-16);
    line-height: 1.5;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-hazirlik b {
    display: block;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-etiket-dugme,
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-kaydet {
    flex: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    min-height: 56px;
    order: 3;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-ozet .sip-serit-eylemler {
    flex: none;
    order: 4;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-kaydet {
    order: 4;
    min-height: 76px;
    white-space: normal;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-eksik-baslik {
    margin: 20px 0 4px;
    color: var(--hata-metin);
    font-weight: 600;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-eksikler {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 3px solid var(--hata-cizgi);
    padding-left: 8px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-eksikler .sip-git {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 8px 0;
    text-align: left;
    white-space: normal;
    color: var(--siyah);
    font-size: var(--y-16);
    text-decoration: none;
    border: 0;
    border-bottom: 1px solid var(--cizgi);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-alan.hatali > .sip-etiket {
    color: var(--hata-metin);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-bolum-alt {
    align-items: center;
    gap: 8px;
    margin-top: 8px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-bolum-alt > .sip-ipucu {
    flex: 1;
    margin: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-bolum-tamam {
    flex: none;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-araclar {
    background: transparent;
    position: absolute;
    z-index: 5;
    top: calc(-1 * var(--sip-baslik-boy));
    left: auto;
    right: 72px;
    height: var(--sip-baslik-boy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 44px;
    pointer-events: none;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik > #surum-serit {
    position: absolute;
    z-index: 6;
    top: 0;
    right: 72px;
    width: var(--pos-siparis-arac-en, 320px);
    margin: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-araclar > * {
    pointer-events: auto;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-araclar .sip-hedef {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 0;
    align-self: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: var(--y-16);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-araclar .sip-temizle {
    flex: none;
    margin: 0;
    padding: 0;
    gap: 8px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-araclar button {
    min-height: 44px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-form-araclar .note {
    margin: 0;
    padding: 0;
    font-size: var(--y-14);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-matris {
    background: transparent;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-ikili [data-hata='alici.telefon'],
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-ikili [data-yer='tel-uyari'] {
    width: calc(200% + 8px);
    box-sizing: border-box;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-taziye-alici [data-hata='alici.telefon'],
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-taziye-alici [data-yer='tel-uyari'] {
    margin-left: calc(-100% - 8px);
  }
  /* K1 A: arama ve Hepsini aynı satırda; sol liste 15 satırlık alanı korur. */
  html body.tezgah-pos #modal.pos-siparis-form-acik [data-yer='d3-ust'] {
    grid-area: ust;
    display: flex;
    padding: 0 12px;
    min-height: 56px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-ara {
    flex: 1;
    width: auto;
    min-height: 56px;
    height: 56px;
    margin: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-ara-yok {
    display: none;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-hep {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-hedef {
    padding-right: 16px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-sr {
    grid-template-columns: minmax(0, 1fr) 84px 130px 92px;
    column-gap: 8px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-sr .d3-tt {
    grid-column: 4;
    grid-row: 1;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-sr .d3-kap {
    grid-column: 3;
    grid-row: 1;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-kk {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-kk .d3-sr {
    padding-right: 10px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-kk-kap {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 110px;
    width: 130px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-ekle {
    width: calc(100% - 16px);
    margin: 0 8px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-ekle-dugme {
    min-height: 44px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .d3-sol {
    padding-top: 0;
    padding-bottom: 0;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik #modal-body > #number-pad:not([hidden]) {
    width: calc(576 / 1504 * 100% - 24px);
  }
  /* Karar 703: beş yol metnin istediği genişlikte, aynı sırada. */
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-govde .sip-yollar[data-adet='5'] {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-yollar > button {
    flex: 1 1 auto;
    min-width: min-content;
    min-height: 60px;
    padding: 6px;
    white-space: normal;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-yollar > button > span:first-child {
    font-size: var(--y-17);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-gunler {
    gap: 6px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-gunler > button {
    min-height: 60px;
    white-space: nowrap;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-saatler {
    flex-wrap: nowrap;
    gap: 6px;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-saatler > button {
    min-height: 56px;
    font-size: var(--y-16);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-govde button[aria-pressed='true']:not(:disabled) {
    background: var(--beyaz);
    color: var(--koyu-kirmizi);
    border-color: var(--koyu-kirmizi);
    box-shadow: none;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-govde button[aria-pressed='true']:not(:disabled) > span {
    color: inherit;
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik .sip-alan.hatali > .sip-cipler > button:not([aria-pressed='true']) {
    border-color: var(--cizgi);
  }
}

/* Tam pencerede bildirim sabit başlık/boşluk alanındadır; içerikten satır almaz. */
@media screen and (min-width: 901px) {
  .tezgah-pos #modal > #pos-pencere-bildirim-yeri:not([hidden]) {
    position: fixed;
    z-index: 6;
    padding: 0;
  }
  .tezgah-pos #modal > #pos-pencere-bildirim-yeri > #notice {
    line-height: 1.2;
  }
}
/* Dar sınırın tek kaynağı CSS; yerleştirici bu işareti okur. */
@media screen and (min-width: 901px) and (max-width: 1400px) {
  html body.tezgah-pos #modal.pos-siparis-form-acik[open] {
    --sip-bildirim-dar: 1;
    --sip-baslik-boy: var(--sip-dar-baslik-boy);
    --sip-bildirim-ust: var(--sip-dar-bildirim-ust);
    --sip-baslik-konum: absolute;
    --sip-baslik-metin-en: var(--sip-dar-baslik-en);
  }
}
/* Başlık ve bildirim solda iki sabit sıradır; yer yoksa geniş kasada da aynı sıra kullanılır.
   Bildirim gizliyken de hesaplanır: içerik açılıp kapanınca zıplamaz. */
@media screen and (min-width: 901px) {
  html body.tezgah-pos #modal.pos-siparis-form-acik.sip-bildirim-alt-sira[open] {
    --sip-baslik-boy: var(--sip-dar-baslik-boy);
    --sip-bildirim-ust: var(--sip-dar-bildirim-ust);
    --sip-baslik-konum: absolute;
    --sip-baslik-metin-en: var(--sip-dar-baslik-en);
  }
  html body.tezgah-pos #modal.pos-siparis-form-acik.sip-bildirim-alt-sira #modal-title {
    margin: 0;
  }
}
