/* Shared inquiry form components (LOCAL redesign draft):
   .nb-form-sec / .nb-form-intro / .nb-form-card  -> nb_form_section() in redesign-tools/lib.php
   .nb-dp*                                       -> redesign-staging/js/nb-datepicker.js
   WPForms' own CSS is disabled on this site ("No styling"), so every form control is styled here. */

/* ---------- Section layout ---------------------------------------------- */
body.nb-redesign .e-con.nb-form-sec { scroll-margin-top: 24px; }
body.nb-redesign .e-con.nb-form-intro { --gap: 16px 16px; --row-gap: 16px; position: sticky; top: 24px; }
body.nb-redesign .nb-form-aside__urgent {
  margin: 4px 0 0 !important; padding: 14px 16px; border-radius: var(--nb-radius-sm); background: var(--nb-blush);
  font-size: 15px !important; line-height: 1.5 !important; color: var(--nb-plum) !important;
}
body.nb-redesign .nb-form-aside__urgent strong { color: var(--nb-plum); }
body.nb-redesign .nb-sec--blush .nb-form-aside__urgent, body.nb-redesign .nb-sec--rose .nb-form-aside__urgent { background: rgba(255, 255, 255, .75); }
body.nb-redesign ul.nb-form-facts { list-style: none; margin: 4px 0 0 !important; padding: 0 !important; display: grid; gap: 10px; }
body.nb-redesign ul.nb-form-facts li {
  margin: 0 !important; padding: 0 0 10px !important; border-bottom: 1px solid var(--nb-line);
  font-size: 15px; line-height: 1.55; color: var(--nb-text);
}
body.nb-redesign ul.nb-form-facts li::before { content: none !important; }
body.nb-redesign ul.nb-form-facts li:last-child { border-bottom: 0; padding-bottom: 0 !important; }
body.nb-redesign ul.nb-form-facts b { display: block; font-size: 13px; letter-spacing: .02em; color: var(--nb-plum); margin-bottom: 2px; }
body.nb-redesign ul.nb-form-facts a { color: var(--nb-raspberry-dark); font-weight: 600; }

/* ---------- Card ---------------------------------------------------------- */
body.nb-redesign .e-con.nb-form-card {
  background-color: #fff !important; border-radius: var(--nb-radius); box-shadow: var(--nb-shadow-lg);
  --padding-top: 34px; --padding-bottom: 34px; --padding-left: 34px; --padding-right: 34px;
}
body.nb-redesign .nb-form-card .wpforms-container { max-width: none !important; margin: 0 !important; }
body.nb-redesign .nb-form-card .wpforms-field-container { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
body.nb-redesign .nb-form-card .wpforms-field-container > * { grid-column: 1 / -1; }
body.nb-redesign .nb-form-card .wpforms-field-container > .wpforms-field.wpforms-one-half { grid-column: auto; }
body.nb-redesign .nb-form-card .wpforms-container .wpforms-field[hidden] { display: none !important; }
body.nb-redesign .nb-form-card .wpforms-container .wpforms-field {
  width: auto !important; float: none !important; margin: 0 0 16px !important; padding: 0 !important; clear: none !important;
}
body.nb-redesign .nb-form-card .wpforms-field-label {
  display: block; color: var(--nb-plum) !important; font-size: 14px !important; font-weight: 600 !important; margin: 0 0 6px !important;
}
body.nb-redesign .nb-form-card .wpforms-required-label { color: var(--nb-raspberry); }
body.nb-redesign .nb-form-card .wpforms-container input[type="text"],
body.nb-redesign .nb-form-card .wpforms-container input[type="email"],
body.nb-redesign .nb-form-card .wpforms-container input[type="tel"],
body.nb-redesign .nb-form-card .wpforms-container select,
body.nb-redesign .nb-form-card .wpforms-container textarea {
  display: block; width: 100% !important; max-width: none !important; box-sizing: border-box;
  border: 1px solid #ccb3bd !important; border-radius: 10px !important; background: #fffdfb !important;
  padding: 12px 14px !important; font: 400 16px/1.4 var(--nb-sans) !important; color: var(--nb-plum) !important;
  min-height: 48px; height: auto !important; box-shadow: none !important; transition: border-color .15s ease, box-shadow .15s ease;
}
body.nb-redesign .nb-form-card .wpforms-container select {
  appearance: none; -webkit-appearance: none; padding-right: 42px !important; cursor: pointer;
  background: #fffdfb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c1249' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px 18px !important;
}
body.nb-redesign .nb-form-card .wpforms-container textarea { min-height: 120px !important; resize: vertical; }
body.nb-redesign .nb-form-card .wpforms-container input::placeholder,
body.nb-redesign .nb-form-card .wpforms-container textarea::placeholder { color: #806673; opacity: 1; }
/* Visible focus: raspberry border (5.9:1 on white) + soft ring */
body.nb-redesign .nb-form-card .wpforms-container input:focus,
body.nb-redesign .nb-form-card .wpforms-container select:focus,
body.nb-redesign .nb-form-card .wpforms-container textarea:focus {
  outline: none !important; border-color: var(--nb-raspberry) !important; box-shadow: 0 0 0 3px rgba(194, 24, 91, .22) !important;
}
body.nb-redesign .nb-form-card .wpforms-container input[type="checkbox"]:focus-visible,
body.nb-redesign .nb-form-card .wpforms-container input[type="radio"]:focus-visible { outline: 2px solid var(--nb-raspberry) !important; outline-offset: 2px; }
body.nb-redesign .nb-form-card .wpforms-field-description { font-size: 13px; color: var(--nb-text); margin-top: 6px; line-height: 1.5; }
body.nb-redesign .nb-form-card label.wpforms-error,
body.nb-redesign .nb-form-card em.wpforms-error {
  display: block; margin-top: 6px; font: 600 13px/1.4 var(--nb-sans); font-style: normal; color: var(--nb-error);
}
body.nb-redesign .nb-form-card .wpforms-container input.wpforms-error,
body.nb-redesign .nb-form-card .wpforms-container select.wpforms-error,
body.nb-redesign .nb-form-card .wpforms-container textarea.wpforms-error { border-color: var(--nb-error) !important; }

/* Radio choices as inline pills (e.g. "Odbiór") */
body.nb-redesign .nb-form-card .wpforms-field ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
body.nb-redesign .nb-form-card .wpforms-field.nb-choice-inline ul { display: flex; flex-wrap: wrap; gap: 8px; }
body.nb-redesign .nb-form-card .wpforms-field.nb-choice-inline li { position: relative; margin: 0 !important; list-style: none !important; }
body.nb-redesign .nb-form-card .wpforms-field.nb-choice-inline li::before { content: none !important; }
body.nb-redesign .nb-form-card .wpforms-field.nb-choice-inline input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
body.nb-redesign .nb-form-card .wpforms-field.nb-choice-inline label.wpforms-field-label-inline {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid #ccb3bd; border-radius: 999px;
  background: #fffdfb; font: 500 15px/1.3 var(--nb-sans) !important; color: var(--nb-plum) !important; cursor: pointer;
}
body.nb-redesign .nb-form-card .wpforms-field.nb-choice-inline input[type="radio"]:checked + label {
  border-color: var(--nb-raspberry); background: var(--nb-blush); box-shadow: inset 0 0 0 1px var(--nb-raspberry);
}
body.nb-redesign .nb-form-card .wpforms-field.nb-choice-inline input[type="radio"]:focus-visible + label { outline: 2px solid var(--nb-raspberry); outline-offset: 2px; }

body.nb-redesign .nb-form-card .wpforms-submit-container { margin-top: 6px !important; text-align: left !important; padding: 0 !important; }
body.nb-redesign .nb-form-card .wpforms-submit-container button.wpforms-submit {
  width: 100%; min-height: 52px; background-color: var(--nb-raspberry) !important; border: 2px solid var(--nb-raspberry) !important;
  border-radius: 999px !important; padding: 15px 30px !important; font: 700 16px/1.2 var(--nb-sans) !important; letter-spacing: .02em;
  color: #fff !important; box-shadow: 0 8px 20px rgba(194, 24, 91, .22); text-transform: none !important; cursor: pointer;
}
body.nb-redesign .nb-form-card .wpforms-submit-container button.wpforms-submit:hover { background-color: var(--nb-raspberry-dark) !important; border-color: var(--nb-raspberry-dark) !important; }
body.nb-redesign .nb-form-card .wpforms-submit-container button.wpforms-submit:focus-visible { outline: 3px solid var(--nb-plum) !important; outline-offset: 3px; }
body.nb-redesign .nb-form-card .wpforms-confirmation-container-full {
  background: var(--nb-sage); border: 0; border-radius: var(--nb-radius-sm); padding: 20px 22px; color: var(--nb-plum);
}
body.nb-redesign .nb-form-card .wpforms-confirmation-container-full a { color: var(--nb-raspberry-dark); font-weight: 700; }

/* ---------- WPForms consent field (all forms; class nb-consent set in build-forms.php) ----------
   WPForms CSS is disabled on this site (Settings → "No styling"), so the consent checkbox
   would otherwise render as a bulleted list. Scoped by the field class, not by page. */
.wpforms-container .wpforms-field.nb-consent ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.wpforms-container .wpforms-field.nb-consent li { display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; list-style: none !important; }
.wpforms-container .wpforms-field.nb-consent input[type="checkbox"] {
  flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0 !important; accent-color: #c2185b; cursor: pointer;
}
.wpforms-container .wpforms-field.nb-consent .wpforms-field-label-inline {
  font-size: 14px !important; line-height: 1.55 !important; font-weight: 400 !important; color: #5c3344 !important; cursor: pointer;
}
.wpforms-container .wpforms-field.nb-consent a { color: #c2185b !important; text-decoration: underline !important; }
.wpforms-container .wpforms-field.nb-consent .wpforms-required-label { color: #c2185b; }

/* ---------- Date picker (nb-datepicker.js) -------------------------------- */
/* Buttons are reset with all:unset: Astra, WPForms and the legacy CSS all style <button>. */
body.nb-redesign .nb-dp button, body.nb-redesign button.nb-dp-toggle, body.nb-redesign .nb-dp-quick button { all: unset; box-sizing: border-box; cursor: pointer; }
body.nb-redesign .nb-dp button:focus-visible, body.nb-redesign button.nb-dp-toggle:focus-visible, body.nb-redesign .nb-dp-quick button:focus-visible {
  outline: 2px solid var(--nb-raspberry); outline-offset: 2px;
}
body.nb-redesign .nb-dp-wrap { position: relative; display: block; }
body.nb-redesign .nb-form-card .nb-dp-wrap input[type="text"] { padding-right: 52px !important; }
body.nb-redesign button.nb-dp-toggle {
  position: absolute; top: 0; right: 0; width: 48px; min-height: 44px; display: grid; place-items: center;
  color: var(--nb-raspberry-dark); border-radius: 0 10px 10px 0;
}
body.nb-redesign button.nb-dp-toggle svg { width: 20px; height: 20px; }
body.nb-redesign button.nb-dp-toggle:hover, body.nb-redesign button.nb-dp-toggle[aria-expanded="true"] { background: var(--nb-blush); }

body.nb-redesign .nb-dp-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
body.nb-redesign .nb-dp-quick button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #ccb3bd; border-radius: 999px;
  background: #fffdfb; font: 600 14px/1 var(--nb-sans); color: var(--nb-plum);
}
body.nb-redesign .nb-dp-quick button:hover { border-color: var(--nb-raspberry); }
body.nb-redesign .nb-dp-quick button[aria-pressed="true"] { border-color: var(--nb-raspberry); background: var(--nb-blush); box-shadow: inset 0 0 0 1px var(--nb-raspberry); }

body.nb-redesign .nb-dp-status { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0 !important; font-size: 14px !important; line-height: 1.45 !important; color: var(--nb-text) !important; }
body.nb-redesign .nb-dp-status:empty { display: none; }
body.nb-redesign .nb-dp-status svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; }
body.nb-redesign .nb-dp-status a { color: var(--nb-raspberry-dark); font-weight: 700; white-space: nowrap; }
body.nb-redesign .nb-dp-status.is-free { color: var(--nb-ok) !important; font-weight: 600; }
body.nb-redesign .nb-dp-status.is-prebooked { color: var(--nb-warn) !important; }
body.nb-redesign .nb-dp-status.is-booked, body.nb-redesign .nb-dp-status.is-inaccessible { color: var(--nb-bad) !important; }
body.nb-redesign .nb-dp-status.is-urgent { padding: 10px 12px; border-radius: var(--nb-radius-sm); background: var(--nb-blush); color: var(--nb-plum) !important; }

body.nb-redesign .nb-form-card .nb-dp,
body.nb-redesign .nb-dp {
  grid-column: 1 / -1; margin: -4px 0 18px; padding: 16px 18px 14px;
  background: #fff; border: 1px solid var(--nb-line); border-radius: var(--nb-radius); box-shadow: 0 14px 34px rgba(58, 31, 43, .12);
}
body.nb-redesign .nb-dp[hidden] { display: none !important; }
/* The one authored motion: the calendar answers the click (routine state change, 180ms, decelerating) */
body.nb-redesign .nb-dp:not([hidden]) { animation: nb-dp-in .18s cubic-bezier(.16, 1, .3, 1); }
@keyframes nb-dp-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.nb-redesign .nb-dp:not([hidden]) { animation: none; } }
body.nb-redesign .nb-dp__head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
body.nb-redesign .nb-dp__title { flex: 1; margin: 0 !important; text-align: center; font: 600 15px/1.3 var(--nb-sans) !important; color: var(--nb-plum) !important; }
body.nb-redesign .nb-dp button.nb-dp__nav, body.nb-redesign .nb-dp button.nb-dp__close {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; display: grid; place-items: center; color: var(--nb-plum); border: 1px solid var(--nb-line);
}
body.nb-redesign .nb-dp button svg { width: 20px; height: 20px; }
body.nb-redesign .nb-dp button.nb-dp__close { border-color: transparent; }
body.nb-redesign .nb-dp button.nb-dp__nav:hover:not(:disabled), body.nb-redesign .nb-dp button.nb-dp__close:hover { background: var(--nb-blush); }
body.nb-redesign .nb-dp button.nb-dp__nav:disabled { opacity: .3; cursor: default; }

body.nb-redesign .nb-dp__months { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
body.nb-redesign .nb-dp__mname { margin: 0 0 8px !important; text-align: center; font: 700 14px/1.3 var(--nb-sans) !important; color: var(--nb-plum) !important; }
body.nb-redesign .nb-dp__msg { grid-column: 1 / -1; margin: 28px 0 !important; text-align: center; font-size: 14px !important; color: var(--nb-text) !important; }
body.nb-redesign .nb-dp__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
body.nb-redesign .nb-dp__dow { padding: 2px 0 4px; text-align: center; font: 600 11px/1 var(--nb-sans); color: var(--nb-text); }
body.nb-redesign .nb-dp button.nb-dp__day {
  position: relative; height: 40px; border-radius: 8px; display: grid; place-items: center;
  font: 500 14px/1 var(--nb-sans); color: var(--nb-plum); background: #faf5f7;
}
body.nb-redesign .nb-dp button.nb-dp__day:hover:not([aria-disabled]) { box-shadow: inset 0 0 0 2px #d9b5c3; }
body.nb-redesign .nb-dp button.nb-dp__day[aria-current="date"] { box-shadow: inset 0 0 0 1px var(--nb-plum); }
/* Free days: green fill + a dot, so the status is not carried by colour alone */
body.nb-redesign .nb-dp button.nb-dp__day.is-free { background: #e2f1e5; color: var(--nb-ok); font-weight: 700; }
body.nb-redesign .nb-dp button.nb-dp__day.is-free::after {
  content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor;
}
body.nb-redesign .nb-dp button.nb-dp__day.is-free:hover { background: #c9e6cf; }
body.nb-redesign .nb-dp button.nb-dp__day.is-prebooked { background: #fcefd3; color: var(--nb-warn); }
body.nb-redesign .nb-dp button.nb-dp__day.is-booked { background: #f7e6ea; color: #9b6f7b; text-decoration: line-through; cursor: not-allowed; }
body.nb-redesign .nb-dp button.nb-dp__day.is-inaccessible,
body.nb-redesign .nb-dp button.nb-dp__day.is-past { background: transparent; color: #a8939b; cursor: default; }
body.nb-redesign .nb-dp button.nb-dp__day[aria-pressed="true"] { background: var(--nb-raspberry); color: #fff; box-shadow: none; }

body.nb-redesign .nb-dp ul.nb-dp__legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; list-style: none;
  margin: 14px 0 0 !important; padding: 0 !important; font-size: 13px; color: var(--nb-text);
}
body.nb-redesign .nb-dp ul.nb-dp__legend li { display: flex; align-items: center; gap: 6px; margin: 0 !important; padding: 0 !important; }
body.nb-redesign .nb-dp ul.nb-dp__legend li::before { content: none !important; }
body.nb-redesign .nb-dp__legend i { position: relative; width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
body.nb-redesign .nb-dp__legend i.is-free { background: #e2f1e5; box-shadow: inset 0 0 0 1px #8fc59b; }
body.nb-redesign .nb-dp__legend i.is-free::after { content: ""; position: absolute; left: 6px; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--nb-ok); }
body.nb-redesign .nb-dp__legend i.is-prebooked { background: #fcefd3; box-shadow: inset 0 0 0 1px #e0bd73; }
body.nb-redesign .nb-dp__legend i.is-booked { background: #f7e6ea; box-shadow: inset 0 0 0 1px #d9b0bb; }
body.nb-redesign .nb-dp__legend i.is-unknown { background: #faf5f7; box-shadow: inset 0 0 0 1px #d9c4cc; }
body.nb-redesign .nb-dp__src { margin: 8px 0 0 !important; text-align: center; font-size: 13px !important; line-height: 1.4 !important; color: var(--nb-text) !important; }
body.nb-redesign .nb-dp__keys { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 1024px) {
  body.nb-redesign .e-con.nb-form-intro { position: static; }
}
@media (max-width: 600px) {
  body.nb-redesign .e-con.nb-form-card { --padding-top: 24px; --padding-bottom: 24px; --padding-left: 18px; --padding-right: 18px; }
  body.nb-redesign .nb-form-card .wpforms-field-container { grid-template-columns: minmax(0, 1fr); }
  body.nb-redesign .nb-form-card .wpforms-field-container > .wpforms-field.wpforms-one-half { grid-column: 1 / -1; }
  body.nb-redesign .nb-dp { padding: 14px 12px 12px; }
  body.nb-redesign .nb-dp button.nb-dp__day { height: 44px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  body.nb-redesign .nb-form-card .wpforms-container input,
  body.nb-redesign .nb-form-card .wpforms-container select,
  body.nb-redesign .nb-form-card .wpforms-container textarea { transition: none; }
}
