.linen-calculator { scroll-margin-top: 24px; }
.linen-calculator form { max-width: none; }
.linen-calculator h2 { max-width: 24ch; }
.lc-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 28px; align-items: start; margin-top: 30px; }
.lc-selection, .lc-summary, .lc-fieldset { min-width: 0; }
.lc-fieldset { margin: 0 0 24px; padding: 22px; border: 1px solid #6d5930; border-radius: 10px; background: #141813; }
.lc-fieldset legend { padding: 0 8px; color: #e2c387; font-weight: 700; }
.lc-filters, .lc-two, .lc-address { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 18px; }
.linen-calculator label { margin-top: 10px; }
.linen-calculator input, .linen-calculator select, .linen-calculator button { max-width: 100%; min-width: 0; font-size: 16px; }
.linen-calculator button { min-height: 48px; cursor: pointer; }
.linen-calculator button:disabled { opacity: .65; cursor: default; }
.lc-help { font-size: 14px; color: #c8c7bb; line-height: 1.55; }
.lc-help a { color: #e2c387; }
.lc-items { display: grid; gap: 10px; max-height: 620px; overflow-y: auto; padding: 2px; }
.lc-item { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; align-items: center; padding: 14px; border: 1px solid #51472f; border-radius: 6px; background: #0f130e; }
.lc-item label { margin: 0; font-weight: 700; color: #f1ebdd; }
.lc-item small { display: block; color: #c5bfae; font-size: 13px; font-weight: 400; }
.lc-item input { margin: 0; width: 100%; }
.lc-item[hidden], .linen-calculator [hidden] { display: none !important; }
.lc-consent { display: flex; align-items: start; gap: 10px; font-size: 14px; line-height: 1.5; }
.linen-calculator .lc-consent input { width: 20px; height: 20px; flex: 0 0 20px; margin: 1px 0 0; }
.lc-route-result { margin-top: 18px; padding-top: 8px; border-top: 1px solid #655331; }
.lc-route-result p { font-size: 14px; overflow-wrap: anywhere; }
.lc-route-result dl, .lc-totals { margin: 16px 0; }
.lc-route-result dl > div, .lc-totals > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 9px 0; border-bottom: 1px solid #574a32; }
.lc-route-result dt, .lc-totals dt { min-width: 0; flex: 1 1 160px; }
.lc-route-result dd, .lc-totals dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; color: #f3d997; }
.lc-summary { padding: 24px; border: 1px solid #a68b4e; border-radius: 10px; background: #1a2016; }
.lc-summary h3 { margin: 0 0 18px; font-size: 26px; line-height: 1.25; }
.lc-selected { max-height: 260px; overflow-y: auto; font-size: 14px; }
.lc-selected p { margin: 0 0 10px; overflow-wrap: anywhere; }
.lc-selected small { display: block; color: #bbbbaa; }
.lc-total { margin-top: 8px; font-size: 19px; font-weight: 700; }
.lc-delivery-note { color: #efdaaa; padding: 12px 0; font-size: 14px; line-height: 1.5; }
.lc-status { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.lc-status:empty { display: none; }
.lc-status[data-error="true"] { color: #ffd2b8; }
.linen-calculator :focus-visible { outline: 3px solid #f4d894; outline-offset: 3px; }
@media (min-width: 1001px) { .lc-summary { position: sticky; top: 24px; } }
@media (max-width: 1000px) { .lc-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .lc-fieldset, .lc-summary { padding: 18px 14px; }
  .lc-filters, .lc-two, .lc-address, .lc-item { grid-template-columns: minmax(0, 1fr); }
  .lc-items, .lc-selected { max-height: none; overflow: visible; }
  .lc-item { gap: 8px; }
  .lc-totals dt { flex-basis: 170px; }
  .lc-total { font-size: 18px; }
  .linen-calculator button { width: 100%; padding: 13px 15px; }
}

.lc-grand-total { margin: 24px 0; padding: 20px 0; border-top: 1px solid #574a32; border-bottom: 1px solid #574a32; }
.lc-grand-total > p:first-child { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.lc-grand-total output { display: block; color: #f3d997; font-size: clamp(30px,3.5vw,44px); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lc-grand-total .lc-help { margin: 10px 0 0; }

/* Optional calculator tools; the print sheet is created only when requested. */
.lc-presets { margin: 0 0 22px; }
.lc-presets > p:first-child { margin-top: 0; }
.lc-bed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 18px; }
.lc-bed-grid > div { min-width: 0; }
.lc-bed-guest-reset { display: flex; align-items: center; }
.linen-calculator .lc-bed-guest-reset button { width: 100%; white-space: normal; }
.linen-calculator .lc-bed-towels { margin-top: 18px; }
.linen-calculator #lc-bed-apply { width: 100%; }
#lc-bed-preview { overflow-wrap: anywhere; }
.lc-preset-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.linen-calculator .lc-preset-buttons button { width: auto; flex: 1 1 130px; white-space: normal; }
.linen-calculator .lc-print-button { display: block; margin-top: 12px; width: 100%; }
.lc-print-sheet { display: none; }
@media (max-width: 600px) {
  .lc-bed-grid { grid-template-columns: minmax(0, 1fr); }
  .lc-bed-guest-reset { margin-top: -6px; }
  .linen-calculator .lc-preset-buttons button { width: 100%; flex-basis: 100%; }
}

@page { size: A4 portrait; margin: 15mm 16mm; }
@media print {
  body.lc-print-ready { margin: 0 !important; padding: 0 !important; min-height: 0 !important; background: #fff !important; }
  body.lc-print-ready > :not(.lc-print-sheet) { display: none !important; }
  body.lc-print-ready .lc-print-sheet {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111 !important;
    background: #fff !important;
    font: 10pt/1.4 Arial, Helvetica, sans-serif !important;
    overflow: visible !important;
  }
  body.lc-print-ready .lc-print-sheet * { box-sizing: border-box; color: #111 !important; background: transparent !important; text-shadow: none !important; box-shadow: none !important; }
  body.lc-print-ready .lc-print-sheet h1 { font: bold 19pt/1.2 Arial, Helvetica, sans-serif; margin: 0 0 4mm; }
  body.lc-print-ready .lc-print-sheet p { margin: 3mm 0; font-size: 10pt; line-height: 1.4; }
  body.lc-print-ready .lc-print-sheet .lc-print-date { margin-bottom: 6mm; font-size: 9pt; }
  body.lc-print-ready .lc-print-sheet table { width: 100%; margin: 4mm 0 6mm; border-collapse: collapse; table-layout: fixed; }
  body.lc-print-ready .lc-print-sheet th, .lc-print-sheet td { padding: 2mm 0; border-bottom: .2mm solid #bbb; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
  body.lc-print-ready .lc-print-sheet th:last-child, .lc-print-sheet td:last-child { width: 35%; padding-left: 5mm; text-align: right; }
  body.lc-print-ready .lc-print-sheet thead { display: table-header-group; }
  body.lc-print-ready .lc-print-sheet tr { break-inside: avoid; page-break-inside: avoid; }
  body.lc-print-ready .lc-print-sheet .lc-print-total { margin: 5mm 0; padding: 4mm 0; border-top: .4mm solid #111; border-bottom: .4mm solid #111; break-inside: avoid; }
  body.lc-print-ready .lc-print-sheet .lc-print-total h2 { font: bold 12pt/1.3 Arial, Helvetica, sans-serif; margin: 0 0 2mm; }
  body.lc-print-ready .lc-print-sheet .lc-print-total p { font-size: 17pt; font-weight: bold; margin: 0; }
  body.lc-print-ready .lc-print-sheet .lc-print-costs { font-weight: bold; }
  body.lc-print-ready .lc-print-sheet .lc-print-contact { margin-top: 7mm; padding-top: 3mm; border-top: .2mm solid #bbb; font-size: 9pt; overflow-wrap: anywhere; }
}
