/* Print Graphic Pro 2.9.8: safe responsive CSS overlay. No pricing or data mutations. */
/* Keep narrow windows from being widened by nested form grids or content. */
html { max-width:100%; }
body { max-width:100%; }
.app-shell, .app-shell > .page, .page > .panel, .edit-order-panel,
.edit-order-form, .edit-order-form .edit-items, .edit-order-form .edit-item,
.edit-order-form .edit-customer-grid, .edit-order-form .fulfillment-edit-grid,
.edit-order-form .grid-2 { min-width:0; max-width:100%; }
.app-shell > .page { min-width:0 !important; }
.edit-order-form label, .edit-order-form label > input,
.edit-order-form label > select, .edit-order-form label > textarea { min-width:0; max-width:100%; box-sizing:border-box; }
.edit-order-form input:not([type="checkbox"]):not([type="radio"]),
.edit-order-form select, .edit-order-form textarea { width:100%; box-sizing:border-box; }
.edit-order-panel .section-title { flex-wrap:wrap; gap:12px; min-width:0; }
.edit-order-panel .section-title > div { min-width:0; }
.edit-order-panel .section-title h2 { overflow-wrap:anywhere; }
.edit-top-actions { display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
.edit-order-form .edit-item { overflow-wrap:anywhere; }
/* Addition cards were previously grid children nested within the old edit-item columns.
   Give the card itself full width before laying out its internal fields. */
.edit-order-form .pg-addition-list { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:12px; }
.edit-order-form .pg-addition-list > .pg-extra-card {
  display:block !important; width:100%; min-width:0; max-width:100%;
  padding:clamp(12px,2vw,20px); margin:0; box-sizing:border-box;
}
.edit-order-form .pg-extra-card > h4 { margin:0 0 14px; font-size:15px; line-height:1.6; }
.edit-order-form .pg-extra-grid {
  display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:14px; width:100%; min-width:0; max-width:100%; align-items:start;
}
.edit-order-form .pg-extra-grid > label {
  display:flex !important; flex-direction:column; gap:7px;
  width:100%; min-width:0; margin:0; text-align:start; line-height:1.6;
}
.edit-order-form .pg-extra-grid > label.pg-extra-wide { grid-column:1/-1; }
.edit-order-form .pg-extra-grid input {
  display:block; width:100% !important; max-width:100%; min-width:0;
  min-height:44px; padding:11px 12px; font-size:16px; line-height:1.4;
  border:1px solid #d6e0ee; border-radius:10px; background:#fff; color:#15233b;
}
.edit-order-form .pg-extra-grid input:focus-visible { outline:2px solid #0057ff; outline-offset:1px; }
.edit-order-form .edit-save { margin-top:18px; }
.edit-order-form .edit-save button { min-height:46px; }
/* Smaller desktop/tablet: avoid tiny multi-column controls. */
@media (min-width:901px) and (max-width:1300px) {
  .edit-order-form .edit-customer-grid,
  .edit-order-form .fulfillment-edit-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .edit-order-form .edit-customer-grid .wide,
  .edit-order-form .fulfillment-edit-grid .wide { grid-column:1/-1; }
}
/* Below 900px, Pro must use the mobile navigation; the desktop sidebar must
   never reserve invisible width and push the page off-screen. */
@media (max-width:900px) {
  html,body { width:100%;max-width:100%;overflow-x:hidden !important; }
  body .app-shell { display:block !important; width:100% !important;max-width:100% !important;min-width:0 !important; overflow:visible; }
  body .app-shell > .side { display:none !important; }
  body .app-shell > .page {
    display:block !important; position:relative !important;
    width:100% !important; max-width:100% !important; min-width:0 !important;
    margin:0 !important; margin-inline:0 !important;
    padding:12px 12px calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    inset:auto !important; float:none !important; transform:none !important;
    box-sizing:border-box !important;
  }
  .app-shell > .page > *, .app-shell > .page .panel,
  .app-shell > .page form { min-width:0;max-width:100%;box-sizing:border-box; }
  .app-shell .mobile-brand { display:flex !important; align-items:center; flex-wrap:wrap; gap:8px; min-width:0;max-width:100%; }
  .app-shell .mobile-brand .brand { flex:1 1 150px; min-width:0; }
  .app-shell .mobile-brand .brand b { overflow-wrap:anywhere; font-size:clamp(13px,3.6vw,18px); }
  .app-shell .mobile-brand .mobile-tools { display:flex; flex:0 1 auto; flex-wrap:wrap; gap:6px; min-width:0; }
  .app-shell .page-head { display:flex; flex-wrap:wrap; gap:10px; align-items:start; min-width:0; max-width:100%; }
  .app-shell .page-head > * { min-width:0;max-width:100%; }
  .app-shell .page-head h1 { overflow-wrap:anywhere; }
  .app-shell .head-actions { display:flex; flex-wrap:wrap; min-width:0; gap:7px; }
  .app-shell .desktop-install { display:none !important; }
  body .app-shell > .bottom-nav {
    display:flex !important; position:fixed !important; z-index:990;
    bottom:0; left:0; right:0; width:100%; max-width:100%; min-width:0;
    align-items:center; justify-content:space-around; gap:0;
    padding:7px 5px calc(7px + env(safe-area-inset-bottom,0px));
    box-sizing:border-box; background:#fff; border-top:1px solid #e1e9f4;
    box-shadow:0 -4px 20px rgba(0,32,84,.07);
  }
  .app-shell .bottom-nav a {
    display:flex; flex:1 1 0; flex-direction:column; align-items:center;
    justify-content:center; gap:4px; min-width:0; max-width:100%;
    padding:6px 2px; text-align:center; text-decoration:none;
  }
  .app-shell .bottom-nav .nav-label { font-size:clamp(9px,2.8vw,12px); white-space:normal; line-height:1.3; }
  .page .tablewrap { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  .page img, .page video, .page canvas { max-width:100%; height:auto; }
  .edit-order-panel { margin:0; padding:clamp(12px,2vw,20px); }
  .edit-order-form .edit-customer-grid,
  .edit-order-form .fulfillment-edit-grid,
  .edit-order-form .grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px; }
  .edit-order-form .edit-customer-grid .wide,
  .edit-order-form .fulfillment-edit-grid .wide { grid-column:1/-1; }
  .edit-order-form .edit-item:not(.pg-extra-card) { min-width:0; }
}
@media (max-width:600px) {
  body .app-shell > .page { padding:9px 10px calc(100px + env(safe-area-inset-bottom,0px)) !important; }
  .edit-order-form .edit-customer-grid,
  .edit-order-form .fulfillment-edit-grid,
  .edit-order-form .grid-2,
  .edit-order-form .pg-extra-grid { grid-template-columns:minmax(0,1fr) !important; gap:12px; }
  .edit-order-form .pg-extra-grid > label.pg-extra-wide { grid-column:auto; }
  .edit-order-form .pg-addition-list > .pg-extra-card { padding:14px; }
  .edit-order-form .edit-item:not(.pg-extra-card) { display:grid; grid-template-columns:minmax(0,1fr) !important; gap:10px; }
  .edit-order-form .edit-item:not(.pg-extra-card) .wide { grid-column:auto !important; }
  .edit-order-panel .section-title, .edit-order-panel .edit-top-actions { align-items:stretch; }
  .edit-order-panel .edit-top-actions > a { flex:1 1 auto; text-align:center; }
  .edit-order-form .edit-save button { width:100%; max-width:100%; }
  .app-shell .bottom-nav { overflow-x:hidden; }
  .app-shell .bottom-nav .nav-icon { margin:auto; }
}
@media (max-width:360px) {
  .app-shell .mobile-brand .brand { flex:1 1 100%; }
  .app-shell .mobile-brand .mobile-tools { width:100%; justify-content:space-between; }
  .app-shell .bottom-nav .nav-label { font-size:9px; }
}

/* Pro 2.9.9: explicit selectors and responsive UX for catalogue/installation/design. */
.edit-order-form .pg-extra-grid > label[hidden],
.edit-order-form .pg-extra-grid > .pg-install-extra[hidden],
.edit-order-form .pg-extra-grid > .pg-design-fee[hidden] { display:none !important; }
.edit-order-form .pg-extra-grid select,
.edit-order-form .pg-extra-grid input[readonly] {
  display:block; width:100% !important; min-width:0; max-width:100%;
  min-height:44px; padding:10px 12px; font-size:16px; line-height:1.5;
  border:1px solid #d6e0ee; border-radius:10px; color:#15233b;
  background:#fff; box-sizing:border-box;
}
.edit-order-form .pg-extra-grid input[readonly] { background:#f2f6fc; }
.edit-order-form .pg-addition-list details.pg-extra-card > summary {
  cursor:pointer; padding:12px 0; font-size:14px; color:#33526e;
}
.edit-order-form .pg-addition-list .pg-extra-grid > label,
.edit-order-form .pg-addition-list .pg-extra-grid > label > span { overflow-wrap:anywhere; }
@media(max-width:600px){
  .order-wizard { max-width:100%; min-width:0; }
  .order-wizard .order-product-grid, .order-wizard .branch-grid,
  .order-wizard .detail-fields { min-width:0; max-width:100%; }
  .order-wizard .wizard-actions { flex-wrap:wrap; gap:10px; }
  .order-wizard .wizard-actions > button, .order-wizard .wizard-actions > a { flex:1 1 100%; max-width:100%; }
}
