/* Shared embedded voucher geometry; colors and controls inherit the central UI tokens. */

html.voucher-embedded-document,
html.voucher-embedded-document body{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  background:transparent!important;
}

body.voucher-embedded{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  position:static!important;
  inset:auto!important;
  transform:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  display:block!important;
  background:transparent!important;
}

body.voucher-embedded>.header,
body.voucher-embedded>.topbar,
body.voucher-embedded>#single-print-area{display:none!important;}

body.voucher-embedded>.container{
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-width:none!important;
  margin:0!important;
  padding:6px!important;
  display:block!important;
  overflow:hidden!important;
  background:transparent!important;
}
body.voucher-embedded .layout-grid{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  overflow:hidden!important;
}

body.voucher-embedded-entry #payment-list,
body.voucher-embedded-entry #receipt-list,
body.voucher-embedded-entry #transfer-list{display:none!important;}

body.voucher-embedded-entry #payment-form,
body.voucher-embedded-entry #receipt-form,
body.voucher-embedded-entry #transfer-form{
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:8px 10px!important;
  border:1px solid var(--ui-color-line)!important;
  border-radius:var(--ui-radius-md)!important;
  background:var(--ui-color-surface)!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
body.voucher-embedded-entry #payment-form>.panel-head,
body.voucher-embedded-entry #receipt-form>h3,
body.voucher-embedded-entry #transfer-form>h3{display:none!important;}
body.voucher-embedded-entry #payment-form>.panel-body{
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  padding:0!important;
}
body.voucher-embedded-entry #payment-form form{
  width:100%!important;
  height:100%!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:min-content!important;
  align-content:center!important;
  gap:7px 10px!important;
}
body.voucher-embedded-entry #payment-form .field{
  min-width:0!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:76px minmax(0,1fr)!important;
  align-items:center!important;
  gap:7px!important;
}
body.voucher-embedded-entry #payment-form .field:nth-of-type(5){grid-column:1/-1!important;}
body.voucher-embedded-entry #payment-form .submit-btn{grid-column:1/-1!important;}

body.voucher-embedded-entry #receipt-form form,
body.voucher-embedded-entry #transfer-form form{
  width:100%!important;
  height:100%!important;
  display:grid!important;
  grid-template-columns:76px minmax(0,1fr) 76px minmax(0,1fr)!important;
  grid-auto-rows:min-content!important;
  align-content:center!important;
  align-items:center!important;
  gap:7px 9px!important;
}
body.voucher-embedded-entry #receipt-form form>label:last-of-type,
body.voucher-embedded-entry #transfer-form form>label:last-of-type{grid-column:1!important;}
body.voucher-embedded-entry #receipt-form form>textarea,
body.voucher-embedded-entry #transfer-form form>textarea{grid-column:2/-1!important;}
body.voucher-embedded-entry #receipt-form form>button,
body.voucher-embedded-entry #transfer-form .transfer-form-actions{grid-column:1/-1!important;}

body.voucher-embedded-entry #payment-form label,
body.voucher-embedded-entry #receipt-form label,
body.voucher-embedded-entry #transfer-form label{
  margin:0!important;
  color:var(--ui-color-primary-strong)!important;
  font-size:11px!important;
  font-weight:800!important;
}
body.voucher-embedded-entry #payment-form input:not([type="hidden"]),
body.voucher-embedded-entry #payment-form select,
body.voucher-embedded-entry #payment-form textarea,
body.voucher-embedded-entry #receipt-form input:not([type="hidden"]),
body.voucher-embedded-entry #receipt-form select,
body.voucher-embedded-entry #receipt-form textarea,
body.voucher-embedded-entry #transfer-form input:not([type="hidden"]),
body.voucher-embedded-entry #transfer-form select,
body.voucher-embedded-entry #transfer-form textarea,
body.voucher-embedded-entry .smart-select-input{
  box-sizing:border-box!important;
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:5px 9px!important;
  border-radius:var(--ui-radius-sm)!important;
  font-size:12px!important;
}
body.voucher-embedded-entry #payment-form textarea,
body.voucher-embedded-entry #receipt-form textarea,
body.voucher-embedded-entry #transfer-form textarea{resize:none!important;}
body.voucher-embedded-entry .smart-select{min-width:0!important;margin:0!important;}
body.voucher-embedded-entry #payment-form button,
body.voucher-embedded-entry #receipt-form button,
body.voucher-embedded-entry #transfer-form button,
body.voucher-embedded-entry #transfer-form .btn{
  height:34px!important;
  min-height:34px!important;
  padding:5px 14px!important;
  font-size:11px!important;
}
body.voucher-embedded-entry #transfer-form .transfer-form-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}

body.voucher-embedded-record #payment-form,
body.voucher-embedded-record #receipt-form,
body.voucher-embedded-record #transfer-form{display:none!important;}
body.voucher-embedded-record #payment-list,
body.voucher-embedded-record #receipt-list,
body.voucher-embedded-record #transfer-list{
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:6px!important;
  border:1px solid var(--ui-color-line)!important;
  border-radius:var(--ui-radius-md)!important;
  background:var(--ui-color-surface)!important;
  box-shadow:none!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body.voucher-embedded-record #payment-list>.panel-head,
body.voucher-embedded-record #receipt-list>h3,
body.voucher-embedded-record #transfer-list>h3{display:none!important;}
body.voucher-embedded-record #payment-list>.panel-body{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
}
body.voucher-embedded-record .search-box{flex:0 0 auto!important;margin:0 0 5px!important;}
body.voucher-embedded-record .search-box input{
  box-sizing:border-box!important;
  width:100%!important;
  height:32px!important;
  min-height:32px!important;
  margin:0!important;
  padding:4px 9px!important;
  font-size:11px!important;
}
body.voucher-embedded-record .table-wrap{
  flex:1 1 auto!important;
  min-height:0!important;
  margin:0!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
body.voucher-embedded-record .table-wrap::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}
body.voucher-embedded-record table{width:100%!important;margin:0!important;border-collapse:separate!important;border-spacing:0!important;font-size:10px!important;}
body.voucher-embedded-record thead th{position:sticky!important;top:0!important;z-index:4!important;height:30px!important;padding:4px 6px!important;white-space:nowrap!important;}
body.voucher-embedded-record tbody td{height:29px!important;padding:3px 6px!important;white-space:nowrap!important;vertical-align:middle!important;}
body.voucher-embedded-record tfoot td{position:sticky!important;bottom:0!important;z-index:4!important;height:30px!important;padding:4px 6px!important;background:var(--ui-color-primary-deep)!important;color:#fff!important;font-weight:900!important;}
body.voucher-embedded-record .actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;flex-wrap:nowrap!important;}
body.voucher-embedded-record .inline-form{display:inline-flex!important;margin:0!important;}
body.voucher-embedded-record .btn-edit,
body.voucher-embedded-record .btn-delete,
body.voucher-embedded-record .btn-print{
  height:26px!important;
  min-height:26px!important;
  padding:3px 7px!important;
  font-size:10px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}

@media (max-width:720px){
  body.voucher-embedded-entry #receipt-form form,
  body.voucher-embedded-entry #transfer-form form{grid-template-columns:72px minmax(0,1fr)!important;}
  body.voucher-embedded-entry #receipt-form form>textarea,
  body.voucher-embedded-entry #transfer-form form>textarea{grid-column:2!important;}
}
