/* B24 — avalik portaal, ühine stiil */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --b24-bg: #eef5f1;
  --b24-bg2: #e3ede7;
  --b24-green: #1a6b4a;
  --b24-green-dark: #0f4a32;
  --b24-green-light: #2d9a6a;
  --b24-green-soft: #d4ebe0;
  --b24-green-glow: rgba(26, 107, 74, 0.12);
  --b24-text: #1a2e24;
  --b24-muted: #5a6b60;
  --b24-border: #c5d9ce;
  --b24-card: #fff;
  --b24-font: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --b24-shadow: 0 4px 24px rgba(15, 74, 50, 0.08);
  --b24-shadow-sm: 0 2px 8px rgba(15, 74, 50, 0.06);
  --b24-radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
  max-width: 100%;
}

body.b24-public {
  font-family: var(--b24-font);
  background: linear-gradient(165deg, var(--b24-bg) 0%, #f8fbf9 40%, var(--b24-bg2) 100%);
  color: var(--b24-text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

/* —— Header —— */
.b24-site-hdr {
  background: linear-gradient(135deg, var(--b24-green-dark) 0%, var(--b24-green) 55%, var(--b24-green-light) 100%);
  border-bottom: none;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 16px rgba(15, 74, 50, 0.2);
}
.b24-site-hdr .name {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: 0.04em;
}
.b24-site-hdr .tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1px;
}
.b24-landing-hero {
  padding: 20px 16px 4px;
  max-width: 520px;
  margin: 0 auto;
}
.b24-landing-hero + .b24-page { margin-top: 8px; }

/* Üks leht: banner + vorm, sama valge taust */
body.b24-combined {
  background: #fff;
  overflow-x: hidden;
  max-width: 100%;
}
.b24-combined-top {
  background: #fff;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  border-bottom: none;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}
.b24-combined-top .rek-ad-wrap {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.b24-combined-top .rek-ad-banner {
  width: 100%;
  height: auto;
  display: block;
}
.b24-combined-bottom {
  background: #fff;
  padding-top: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.b24-combined-bottom .b24-page {
  padding-top: 12px;
  max-width: 480px;
  background: #fff;
  overflow-x: hidden;
}
.b24-dev-fill-row {
  text-align: center;
  margin: 0 16px 8px;
}
.b24-dev-fill {
  font-family: inherit;
  font-size: 10px;
  line-height: 1.2;
  padding: 3px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f8f8;
  color: #aaa;
  cursor: pointer;
}
.b24-dev-fill:active {
  color: var(--b24-green);
  border-color: var(--b24-border);
}
.b24-form-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--b24-muted);
  text-align: center;
  margin: 4px 0 12px;
  padding: 0 4px;
}
.b24-form-card-chat.is-locked {
  opacity: 1;
}
.b24-form-card-chat.is-locked .b24-chat-panel {
  opacity: 0.92;
}
.b24-form-card-chat.is-locked .b24-inline-chat-compose input {
  background: #eee;
  color: #888;
}
.b24-form-card-chat.is-locked .b24-btn-chat-send {
  opacity: 0.5;
}
.b24-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.b24-chat-chip {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid var(--b24-border);
  background: #fff;
  color: var(--b24-green);
  cursor: pointer;
}
.b24-chat-chip:hover {
  background: var(--b24-green-soft);
}
.b24-chat-panel {
  background: #e8ece9;
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--b24-border);
}
.b24-inline-chat-msgs {
  min-height: 180px;
  max-height: 45vh;
  overflow-y: auto;
  padding: 4px 2px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.b24-inline-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  font-size: 14px;
  line-height: 1.35;
}
.b24-inline-chat-msg.in {
  align-self: flex-start;
}
.b24-inline-chat-msg.out {
  align-self: flex-end;
}
.b24-inline-chat-who {
  font-size: 10px;
  font-weight: 700;
  color: var(--b24-muted);
  margin: 0 8px 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.b24-inline-chat-msg.out .b24-inline-chat-who {
  text-align: right;
}
.b24-inline-chat-bubble {
  padding: 9px 12px;
  border-radius: 14px;
  word-break: break-word;
}
.b24-inline-chat-msg.in .b24-inline-chat-bubble {
  background: #fff;
  border: 1px solid var(--b24-border);
  border-bottom-left-radius: 4px;
}
.b24-inline-chat-msg.out .b24-inline-chat-bubble {
  background: #d4ebe0;
  border: 1px solid #b8dcc8;
  border-bottom-right-radius: 4px;
}
.b24-inline-chat-when {
  font-size: 10px;
  color: var(--b24-muted);
  margin: 2px 8px 0;
}
.b24-inline-chat-msg.out .b24-inline-chat-when {
  text-align: right;
}
.b24-inline-chat-sys {
  align-self: center;
  font-size: 12px;
  color: var(--b24-muted);
  background: rgba(255,255,255,0.7);
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
  max-width: 95%;
}
.b24-inline-chat-compose {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.b24-inline-chat-compose input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  border: 1.5px solid var(--b24-border);
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}
.b24-inline-chat-compose input:focus {
  border-color: var(--b24-green);
}
.b24-inline-chat-compose input:disabled {
  cursor: not-allowed;
  background: #eee;
}
.b24-btn-chat-send {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 72px;
  max-width: 88px;
  height: 44px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: var(--b24-green);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.b24-btn-chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
body.b24-combined .b24-btn-block {
  max-width: calc(100% - 32px);
  margin-left: 16px;
  margin-right: 16px;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}
html { scroll-behavior: smooth; }
.b24-nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s;
}
.b24-nav-link:hover { background: rgba(255, 255, 255, 0.22); }

/* —— Layout —— */
.b24-page { max-width: 620px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.b24-page-wide { max-width: 640px; }

/* —— Hero (avaleht) —— */
.b24-hero { text-align: center; padding: 0.5rem 0 1.5rem; }
.b24-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(145deg, var(--b24-green) 0%, var(--b24-green-light) 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 18px;
  box-shadow: 0 8px 24px var(--b24-green-glow), 0 4px 12px rgba(26, 107, 74, 0.25);
  margin-bottom: 1rem;
}
.b24-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--b24-green-dark);
  margin-bottom: 0.35rem;
}
.b24-hero .lead { color: var(--b24-muted); font-size: 14px; max-width: 360px; margin: 0 auto 1rem; }

.b24-tag {
  display: inline-block;
  background: var(--b24-green-soft);
  color: var(--b24-green-dark);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--b24-border);
}

/* —— Cards —— */
.b24-card {
  background: var(--b24-card);
  border-radius: var(--b24-radius);
  border: 1px solid var(--b24-border);
  box-shadow: var(--b24-shadow-sm);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  text-align: left;
}
.b24-card h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--b24-muted);
  margin-bottom: 0.75rem;
}

/* —— Buttons —— */
.b24-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 1.25rem; }
.b24-btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--b24-green-light) 0%, var(--b24-green) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 107, 74, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.b24-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 107, 74, 0.4);
}
.b24-btn-outline {
  background: #fff;
  color: var(--b24-green);
  border: 2px solid var(--b24-green);
  box-shadow: var(--b24-shadow-sm);
}
.b24-btn-outline:hover { background: var(--b24-green-soft); }
.b24-btn-block { width: 100%; text-align: center; }
.b24-btn[hidden] { display: none !important; }
.b24-btn-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 18px 0 8px;
  padding: 22px 20px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(26, 107, 74, 0.4);
}
.b24-btn-chat:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26, 107, 74, 0.48);
}
.b24-chat-hint {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--b24-green-dark);
  margin: 0 0 12px;
}
.b24-chat-hint[hidden] { display: none !important; }
.b24-btn-dev {
  background: #6b7280;
  box-shadow: none;
  font-size: 12px;
  padding: 9px;
  margin-top: 8px;
}

.b24-note { font-size: 12px; color: var(--b24-muted); text-align: center; margin-top: 1rem; }

.b24-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 11px;
  color: var(--b24-muted);
  border-top: 1px solid var(--b24-border);
  background: rgba(255, 255, 255, 0.5);
}

/* —— Tooted grid —— */
.b24-page h1.page-title {
  font-size: 1.45rem;
  color: var(--b24-green-dark);
  margin-bottom: 0.35rem;
}
.b24-page .page-lead { color: var(--b24-muted); font-size: 14px; margin-bottom: 1.25rem; }

/* —— Form —— */
.b24-form-banner {
  background: linear-gradient(90deg, var(--b24-green-dark), var(--b24-green));
  color: #fff;
  border-radius: var(--b24-radius);
  padding: 14px 18px;
  margin-bottom: 1rem;
  font-size: 13px;
  box-shadow: var(--b24-shadow-sm);
}
.b24-form-banner strong { font-weight: 700; }

.b24-seg {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
}
.b24-seg-btn {
  display: block;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 16px 8px;
  border: 2px solid var(--b24-green);
  border-radius: 10px;
  background: #fff;
  color: var(--b24-green-dark);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.b24-seg-btn.is-on {
  background: var(--b24-green);
  color: #fff;
}

.b24-form-card {
  background: var(--b24-card);
  border-radius: var(--b24-radius);
  border: 1px solid var(--b24-border);
  box-shadow: var(--b24-shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.b24-form-card-title {
  background: linear-gradient(90deg, var(--b24-green-soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--b24-border);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--b24-green-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.b24-form-card-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--b24-green);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
}
.b24-form-card-body { padding: 14px 16px; }

.b24-row { display: grid; gap: 10px; margin-bottom: 10px; }
.b24-row:last-child { margin-bottom: 0; }
.b24-col2 { grid-template-columns: 1fr 1fr; }

.b24-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--b24-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.b24-label.required::after { content: ' *'; color: #c62828; }

.b24-input,
.b24-form-card input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.b24-form-card textarea {
  width: 100%;
  border: 1.5px solid var(--b24-border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fafcfb;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.b24-input:focus,
.b24-form-card input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):focus,
.b24-form-card textarea:focus {
  outline: none;
  border-color: var(--b24-green-light);
  box-shadow: 0 0 0 3px var(--b24-green-glow);
  background: #fff;
}
.b24-form-card textarea { min-height: 56px; resize: vertical; }

.b24-prod-grid {
  display: grid;
  grid-template-columns: 1fr 64px 1fr 64px;
  gap: 8px 12px;
  align-items: center;
  font-size: 14px;
}
.b24-prod-grid .h {
  font-size: 10px;
  color: var(--b24-muted);
  font-weight: 700;
  text-transform: uppercase;
}
.b24-prod-grid .vol {
  font-weight: 600;
  color: var(--b24-green-dark);
}
.b24-prod-grid input {
  text-align: center;
  padding: 8px;
  font-weight: 600;
}

.b24-qty-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
.b24-qty-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 26px 36px;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 8px;
  position: relative;
  border: 1.5px solid var(--b24-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.b24-qty-row.is-on {
  border-color: var(--b24-green);
  background: #f2f8f3;
}
.b24-qty-row .vol {
  font-weight: 700;
  font-size: 15px;
  color: var(--b24-green-dark);
}
.b24-qty-n {
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  color: var(--b24-text);
}
.b24-qty-row.is-on .vol,
.b24-qty-row.is-on .b24-qty-n { color: var(--b24-green-dark); }
.b24-qty-x,
.b24-qty-plus {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.b24-qty-plus {
  border: none;
  background: var(--b24-green);
  color: #fff;
}
.b24-qty-x {
  border: 1.5px solid #e0e0e0;
  background: #fff;
  color: #9e9e9e;
}
.b24-qty-row.is-on .b24-qty-x { color: #c62828; border-color: #ef9a9a; }
.b24-qty-inp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
  border: 0 !important;
}

.b24-hint { font-size: 11px; color: var(--b24-muted); margin-top: 8px; }

.b24-success {
  background: linear-gradient(180deg, #e8f5e9 0%, #f5f5f5 100%);
  border: 2px solid var(--b24-green-light);
  border-radius: var(--b24-radius);
  padding: 1.25rem 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--b24-shadow);
}
.b24-success[hidden] { display: none !important; }
.b24-confirm-head {
  text-align: center;
  margin-bottom: 1rem;
}
.b24-success h2 { font-size: 1.1rem; color: var(--b24-green-dark); margin-bottom: 0.35rem; }

.b24-confirm-doc {
  background: #fff;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  max-width: 640px;
  margin: 0 auto;
}
.b24-confirm-doc-hdr {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--b24-green);
}
.b24-confirm-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--b24-green-dark);
}
.b24-confirm-sub {
  font-size: 11px;
  color: var(--b24-muted);
  margin-top: 2px;
}
.b24-confirm-meta {
  font-size: 13px;
  text-align: right;
}
.b24-confirm-meta .lbl {
  color: var(--b24-muted);
  font-size: 11px;
  display: block;
}
.b24-confirm-meta strong {
  font-size: 1.35rem;
  color: var(--b24-green);
}
.b24-confirm-sec {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}
.b24-confirm-sec h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--b24-green-dark);
  margin: 0 0 8px;
}
.b24-confirm-dl {
  margin: 0;
  display: grid;
  gap: 6px 12px;
}
.b24-confirm-dl > div {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
}
.b24-confirm-dl dt {
  margin: 0;
  color: var(--b24-muted);
  font-weight: 600;
}
.b24-confirm-dl dd {
  margin: 0;
  font-weight: 600;
  color: #1a1a1a;
  word-break: break-word;
}
.b24-confirm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.b24-confirm-table th,
.b24-confirm-table td {
  border: 1px solid #e0e0e0;
  padding: 8px 10px;
  text-align: left;
}
.b24-confirm-table th {
  background: #f1f8e9;
  color: var(--b24-green-dark);
  font-size: 11px;
  text-transform: uppercase;
}
.b24-confirm-notes {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.b24-confirm-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px dashed #c8e6c9;
  text-align: center;
}
.b24-confirm-foot p { margin: 0 0 6px; font-size: 13px; }
.b24-confirm-foot .b24-hint { font-size: 11px; }

.b24-tarjous-doc { max-width: 720px; }
.b24-tarjous-price { background: #f1f8e9; margin: 0 -0.25rem; padding: 12px 14px !important; border-radius: 8px; border: 1px solid #c8e6c9 !important; }
.b24-price-block { margin-top: 8px; }
.b24-price-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed #c8e6c9; }
.b24-price-total { font-size: 1.1rem; font-weight: 800; color: var(--b24-green-dark); border-bottom: none; margin-top: 8px; padding-top: 10px; border-top: 2px solid var(--b24-green); }
.b24-alv-legal { font-size: 11px; line-height: 1.5; color: #555; margin: 12px 0 0; padding: 10px; background: #fff; border-radius: 6px; border: 1px solid #e0e0e0; }
.b24-tarjous-list { margin: 0; padding-left: 1.2rem; font-size: 13px; line-height: 1.6; }
.b24-tarjous-actions { margin: 16px 0 8px; text-align: center; }
.b24-tarjous-actions .b24-btn { max-width: 320px; margin: 0 auto; }
.b24-lasku-doc { max-width: 760px; }
.b24-lasku-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0; font-size: 13px; }
.b24-lasku-parties h3 { font-size: 11px; text-transform: uppercase; color: var(--b24-green-dark); margin: 0 0 6px; }
.b24-lasku-parties p { margin: 0; line-height: 1.5; }
.b24-lasku-bank { background: #fffde7; border: 1px solid #fff59d !important; border-radius: 8px; padding: 12px 14px !important; }
.b24-lasku-lead { background: #e3f2fd; border: 1px solid #90caf9 !important; border-radius: 8px; padding: 12px 14px !important; }
.lk-arve-pending { color: #e65100; font-size: 1rem !important; }
.b24-preview-banner { background: #fff3e0; border: 1px solid #ffb74d; color: #e65100; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 600; text-align: center; }
.b24-preview-banner[hidden] { display: none !important; }
@media (max-width: 640px) { .b24-lasku-parties { grid-template-columns: 1fr; } }
.b24-err[hidden] { display: none !important; }
.b24-err:not([hidden]) { display: block; }
#loading[hidden], #tarjousDoc[hidden] { display: none !important; }
#tarjousDoc:not([hidden]) { display: block; }
.b24-form-card input.b24-input-invalid,
.b24-field-invalid input,
.b24-field-invalid textarea,
.b24-prod-grid input.b24-input-invalid {
  border-color: #d32f2f !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15) !important;
}
.b24-field-ok input,
.b24-field-ok textarea,
.b24-prod-grid input.b24-input-ok {
  border-color: #2e7d32 !important;
  background: #f6fbf6 !important;
}
.b24-field-warn input,
.b24-prod-grid input.b24-input-warn {
  border-color: #f9a825 !important;
  background: #fffde7 !important;
}
.b24-field-msg {
  display: block;
  font-size: 11px;
  margin-top: 3px;
  min-height: 14px;
}
.b24-field-invalid .b24-field-msg { color: #c62828; font-weight: 600; }
.b24-field-warn .b24-field-msg { color: #e65100; }
.b24-field-ok .b24-field-msg { color: #2e7d32; }

.b24-step-req {
  font-size: 11px;
  font-weight: 600;
  color: #c62828;
  margin-left: 6px;
}
.b24-form-card.b24-qty-active {
  border-color: #ef9a9a;
  box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.12);
}
.b24-form-card.b24-card-locked {
  position: relative;
  opacity: 0.62;
  pointer-events: none;
  user-select: none;
  filter: grayscale(0.15);
}
.b24-form-card-lock {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  font-size: 14px;
  color: #b71c1c;
  pointer-events: none;
}
.b24-form-card.b24-card-locked .b24-form-card-lock { display: flex; }
.b24-qty-block-msg {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #c62828;
  min-height: 16px;
}
.b24-btn-wait:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  background: #9e9e9e !important;
  border-color: #757575 !important;
}

@keyframes b24-invalid-blink {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
    border-color: #d32f2f;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(211, 47, 47, 0.45);
    border-color: #b71c1c;
    background: #ffebee !important;
  }
}
@keyframes b24-card-blink {
  0%, 100% { box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15); border-color: #ef9a9a; }
  50% { box-shadow: 0 0 0 5px rgba(211, 47, 47, 0.35); border-color: #c62828; }
}
.b24-field-invalid.b24-field-blink input,
.b24-field-invalid.b24-field-blink textarea,
.b24-prod-grid input.b24-input-blink {
  animation: b24-invalid-blink 0.55s ease-in-out 3;
}
.b24-form-card.b24-card-blink {
  animation: b24-card-blink 0.55s ease-in-out 3;
}

.b24-yt-hint { margin-top: 4px; margin-bottom: 0; }

.b24-success .kombain-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--b24-green);
  font-weight: 700;
}
.b24-success .order-id {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--b24-green);
  margin: 0.5rem 0;
}

.b24-err {
  display: none;
  background: #fdecea;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.b24-err a {
  color: #1565c0;
  font-weight: 700;
  text-decoration: underline;
}
.b24-err a:hover { color: #0d47a1; }

@media (max-width: 520px) {
  .b24-col2, .b24-prod-grid { grid-template-columns: 1fr !important; }
  .b24-actions { flex-direction: column; }
  .b24-btn.b24-btn-block { width: 100%; text-align: center; }
}

@media (max-width: 640px) {
  body.b24-public,
  body.b24-combined {
    min-height: 100dvh;
    background: #fff;
    overflow-x: hidden;
    max-width: 100vw;
  }
  .b24-site-hdr {
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top, 0));
  }
  .b24-site-hdr .name { font-size: 1.05rem; }
  .b24-site-hdr .tagline { display: none; }
  .b24-nav-link {
    padding: 6px 10px;
    font-size: 12px;
  }
  .b24-form-banner { display: none; }
  .b24-page,
  .b24-page-wide {
    max-width: 100%;
    padding: 0 0 2rem;
    margin: 0;
    overflow-x: hidden;
  }
  .b24-form-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 0;
    box-shadow: none;
    max-width: 100%;
    overflow-x: hidden;
  }
  .b24-qty-list { max-width: 100%; }
  .b24-form-card-body {
    padding: 14px 16px;
    max-width: 100%;
    overflow-x: hidden;
  }
  .b24-inline-chat-compose {
    padding: 0 16px 16px;
    max-width: 100%;
  }
  .b24-form-card + .b24-form-card {
    border-top: 8px solid var(--b24-bg, #eef5f1);
  }
  .b24-col2 { grid-template-columns: 1fr !important; }
  .b24-form-card-body { padding: 14px 16px; }
  .b24-form-card-title { padding: 10px 16px; }
  .b24-row { margin-bottom: 10px; }
  .b24-form-card input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
  .b24-form-card textarea,
  .b24-form-card select {
    font-size: 16px;
    padding: 12px 14px;
  }
  .b24-qty-x,
  .b24-qty-plus { width: 40px; height: 40px; }
  .b24-btn-block { margin: 16px; width: calc(100% - 32px); }
  .b24-hint { font-size: 12px; line-height: 1.45; }
  .b24-err[hidden],
  .b24-err:empty { display: none !important; margin: 0; padding: 0; border: none; height: 0; }
  .b24-err:not([hidden]):not(:empty) { display: block; margin: 0 16px 12px; }
}
