/* Booking-only reset and iOS scroll containment. */
.booking-option-card-txt,
.booking-agreement-text {
  -webkit-user-select: text;
  user-select: text;
}

.booking-dialog::backdrop,
.booking-dialog-left {
  touch-action: none;
}

.booking-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1000;
  width: min(996px, calc(100vw - 32px));
  max-height: min(866px, calc(100vh - 40px));
  max-height: min(866px, calc(100dvh - 40px));
  padding: 0;
  border: none;
  outline: none;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96) translateY(12px);
  translate: -50% -50%;
  transition:
    opacity 180ms ease-in,
    transform 180ms ease-in,
    overlay 180ms ease-in allow-discrete,
    display 180ms ease-in allow-discrete;
  overflow: hidden;
}

.booking-dialog[open],
.booking-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  transition:
    opacity 300ms var(--ease-out),
    transform 300ms var(--ease-out),
    overlay 300ms var(--ease-out) allow-discrete,
    display 300ms var(--ease-out) allow-discrete;
}

/* Responsive scale adjustment on desktop to bring the form closer */
@media (min-width: 1200px) and (min-height: 940px) {
  .booking-dialog[open],
  .booking-dialog.is-open {
    transform: scale(1.15) translateY(0);
  }
}
@media (min-width: 1024px) and (max-width: 1199px) and (min-height: 900px),
       (min-width: 1200px) and (min-height: 860px) and (max-height: 939px) {
  .booking-dialog[open],
  .booking-dialog.is-open {
    transform: scale(1.08) translateY(0);
  }
}

@starting-style {
  .booking-dialog[open] {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
}

.booking-dialog::backdrop {
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition:
    background-color 250ms var(--ease-out),
    backdrop-filter 250ms var(--ease-out),
    -webkit-backdrop-filter 250ms var(--ease-out),
    overlay 250ms var(--ease-out) allow-discrete,
    display 250ms var(--ease-out) allow-discrete;
}

.booking-dialog[open]::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@starting-style {
  .booking-dialog[open]::backdrop {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
}


.booking-dialog-container {
  display: grid;
  grid-template-columns: 410px 1fr;
  width: 100%;
  height: 100%;
  max-height: min(866px, calc(100vh - 40px));
}

.booking-dialog-left {
  background: #fafafa;
  border-right: 1px solid #f0f0f0;
  padding: 59px 44px 54px 50px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
}

.booking-left-logo {
  display: block;
}

.booking-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.booking-left-title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  color: #000000;
  margin: 24px 0 20px 0;
  letter-spacing: -0.01em;
}

.booking-title-highlight {
  color: var(--lime);
}

.booking-left-subtitle {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: #737373;
  margin: 0 0 83px 0;
}

.booking-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 54px;
  margin-bottom: auto;
}

.booking-benefit-item {
  display: flex;
  gap: 20px;
  align-items: center;
}

.booking-benefit-icon-container {
  position: relative;
  width: 59px;
  height: 59px;
  flex-shrink: 0;
}

.benefit-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.benefit-icon-inner {
  position: absolute;
}

/* Envelope Icon */
.envelope-icon {
  position: absolute;
  top: 19px; /* center vertically in 59px container: (59 - 21.1) / 2 = 18.9px */
  left: 16.5px;
  width: 26px;
  height: 21.1px;
}

.envelope-icon .envelope-body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.envelope-icon .envelope-flap {
  position: absolute;
  width: 62.6%;
  height: 31.5%;
  top: 4%;
  left: 18.7%;
}

/* Smartphone Icon */
.smartphone-icon {
  position: absolute;
  top: 16.5px;
  left: 20.15px; /* center horizontally in 59px container: (59 - 18.7) / 2 = 20.15px */
  width: 18.7px;
  height: 26px;
}

.smartphone-icon .smartphone-body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.smartphone-icon .smartphone-wave {
  position: absolute;
  width: 41.5%;
  height: 6.5%;
  top: 16.2%;
  left: 29.25%;
}

/* Clock Icon */
.clock-icon {
  position: absolute;
  top: 16.5px;
  left: 16.5px;
  width: 26px;
  height: 26px;
}

.clock-icon .clock-circle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.clock-icon .clock-hands {
  position: absolute;
  width: 19.4%;
  height: 37.8%;
  top: 27.6%;
  left: 46.1%;
}

.booking-benefit-content h3 {
  font-size: 14px;
  font-weight: 500;
  color: #000000;
  margin: 0 0 4px 0;
}

.booking-benefit-content p {
  font-size: 12px;
  line-height: 1.4;
  color: #737373;
  margin: 0;
}

.booking-dialog-right {
  padding: 54px 50px 54px 28px;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-sizing: border-box;
}

.dialog-close {
  flex-shrink: 0;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  color: #555;
  cursor: pointer;
  transition: color 220ms var(--ease-out), background-color 220ms var(--ease-out), transform 120ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .dialog-close:hover {
    background: #ececec;
    color: #000;
  }
}

.dialog-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.booking-form-new {
  display: grid;
  gap: 22px;
  width: 100%;
}

/* Multi-step indicator */
.booking-steps-indicator {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 6px;
}

.bsi-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bsi-track {
  display: flex;
  align-items: center;
  padding-bottom: 18px;
}

.bsi-node {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsi-circle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsi-circle svg {
  display: block;
}

.bsi-node-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.bsi-node-label.is-done { color: var(--lime); }
.bsi-node-label.is-active { color: #111; font-weight: 600; }
.bsi-node-label.is-pending { color: #c8c8c8; }

.bsi-connector {
  flex: 1;
  height: 2px;
  margin: 0 8px;
  border-radius: 2px;
  background: #e6e6e6;
  transition: background-color 200ms var(--ease-out);
}

.bsi-connector.is-done {
  background: var(--lime);
}

.bsi-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bsi-current {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.2px;
}

.bsi-name {
  font-size: 11px;
  font-weight: 400;
  color: #bbb;
}

/* Steps */
.booking-step {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.booking-step.is-active {
  display: flex;
}

/* Single-screen form: all field groups show at once. */
.booking-form-new .booking-step {
  display: flex;
}

/* The in-form close button is for mobile only — on desktop the dialog already has
   .booking-desktop-close (top-right). Hiding it on desktop also removes the small
   vertical overflow that was causing the form to scroll. */
.booking-form-topbar {
  display: flex;
  justify-content: flex-end;
}

@media (min-width: 769px) {
  .booking-form-topbar {
    display: none;
  }
}

/* Step navigation */
.booking-step-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 6px;
}

.booking-step-nav .dialog-submit-new.booking-btn-submit {
  flex: 0 0 auto;
  width: 100%;
  min-height: 56px;
}

/* Primary action (Dalej / Wyślij) — matches hero CTA */
.booking-btn-next,
.dialog-submit-new.booking-btn-submit {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 16px;
  background: var(--button-lime-bg);
  color: #000000;
  border: none;
  border-radius: 11px;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--button-lime-shadow-soft);
  width: auto;
  max-width: none;
  margin: 0;
  transition:
    background-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .booking-btn-next:hover,
  .dialog-submit-new.booking-btn-submit:hover {
    background: var(--button-lime-bg-hover);
    box-shadow: var(--button-lime-shadow-hover);
    transform: translateY(-1.5px);
  }
}

.booking-btn-next:active,
.dialog-submit-new.booking-btn-submit:active {
  transform: translateY(1px) var(--button-active-scale);
  box-shadow: 0 3px 10px rgb(var(--lime-rgb) / 0.2);
}

.booking-btn-next svg {
  transform: translateY(-1px);
}

/* Secondary action (Wstecz) — matches hero secondary */
.booking-btn-back {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 56px;
  padding: 0 16px;
  background: #f6f5f5;
  color: #000000;
  border: 1px solid var(--secondary-stroke, #e2e2e2);
  border-radius: 11px;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    transform 140ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .booking-btn-back:hover {
    background: #efeeee;
    border-color: #d4d4d4;
  }

  .booking-btn-submit:hover {
    background: #222;
  }
}

.booking-btn-back:active {
  transform: scale(0.97);
}


.booking-btn-submit:active {
  transform: scale(0.97);
}

/* Highlight invalid fields */
.booking-field input.is-invalid,
.booking-field textarea.is-invalid {
  border-color: #e5484d !important;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.1) !important;
}

/* Inline field error — hidden until the field is marked invalid (blur/submit) */
.field-error {
  display: none;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #e5484d;
}

.booking-field input.is-invalid ~ .field-error,
.booking-field textarea.is-invalid ~ .field-error {
  display: block;
}

.booking-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-field label {
  font-size: 14px;
  font-weight: 500;
  color: #000000;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.booking-label-sub {
  font-size: 12px;
  font-weight: 400;
  color: #737373;
}

.booking-field input[type="text"],
.booking-field input[type="tel"],
.booking-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  background: #f7f7f7;
  font-size: 16px;
  color: #1a1a1a;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.booking-field input[type="text"]::placeholder,
.booking-field input[type="tel"]::placeholder,
.booking-field textarea::placeholder {
  color: #b3b3b3;
}

.booking-field input[type="text"]:focus,
.booking-field input[type="tel"]:focus,
.booking-field textarea:focus {
  outline: 0;
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgb(var(--lime-rgb) / 0.08);
}

.booking-field textarea {
  height: 100px;
  resize: vertical;
  min-height: 80px;
}

/* Okres Wynajmu Grid */
.booking-options-grid {
  display: grid;
  gap: 12px;
  width: 100%;
}

.booking-period-grid {
  grid-template-columns: repeat(3, 1fr);
}

.booking-option-card {
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.booking-option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.booking-option-card-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  width: 100%;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  background: #f7f7f7;
  transition: border-color 220ms var(--ease-out), background-color 220ms var(--ease-out), transform 150ms var(--ease-out), box-shadow 220ms var(--ease-out);
  box-sizing: border-box;
}

.booking-option-card-inner:active {
  transform: scale(0.97);
}

.booking-option-card-txt {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
}

.booking-option-check-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 20px;
  height: 20px;
  transform: scale(0.8);
  opacity: 0;
  pointer-events: none;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), opacity 150ms ease;
  display: block;
}

.booking-option-card input[type="radio"]:checked ~ .booking-option-card-inner {
  border-color: var(--lime);
}

.booking-option-card input[type="radio"]:checked ~ .booking-option-card-inner .booking-option-check-badge {
  transform: scale(1);
  opacity: 1;
}

/* Preferowany Kontakt Grid */
.booking-contact-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.booking-contact-card {
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.booking-contact-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.booking-contact-card-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  width: 100%;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  background: #f7f7f7;
  padding: 0 8px;
  box-sizing: border-box;
  transition: border-color 220ms var(--ease-out), background-color 220ms var(--ease-out), transform 150ms var(--ease-out);
}

.booking-contact-card-inner:active {
  transform: scale(0.97);
}

.contact-label-txt {
  font-size: 13px;
  font-weight: 500;
  color: #737373;
  transition: color 150ms ease;
}

.contact-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.4);
  transition: filter 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.booking-contact-card input[type="radio"]:checked ~ .booking-contact-card-inner {
  border-color: var(--lime);
  background-color: #ffffff;
}

.booking-contact-card input[type="radio"]:checked ~ .booking-contact-card-inner .contact-icon {
  filter: none;
}

.booking-contact-card input[type="radio"]:checked ~ .booking-contact-card-inner .contact-label-txt {
  color: #1a1a1a;
  font-weight: 600;
}

/* Agreement Checkbox Styling */
.booking-agreement-field {
  margin-top: 4px;
  margin-bottom: 2px;
}

.booking-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.booking-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.booking-checkbox-custom {
  width: 20px;
  height: 20px;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  background: #ffffff;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
  transition: border-color 150ms ease, background-color 150ms ease;
  margin-top: 2px;
}

.booking-checkbox-input:checked ~ .booking-checkbox-custom {
  border-color: var(--lime);
  background-color: var(--lime);
}

.booking-checkbox-custom::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.booking-checkbox-input:checked ~ .booking-checkbox-custom::after {
  display: block;
}

.booking-agreement-text {
  font-size: 13px;
  color: #737373;
  line-height: 1.45;
}

.privacy-link {
  color: var(--lime);
  text-decoration: none;
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .privacy-link:hover {
    text-decoration: underline;
  }
}

/* Submit Button */
.dialog-submit-new {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border: 0;
  border-radius: 7px;
  background: var(--lime);
  color: #ffffff;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 200ms ease, transform 120ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 200ms ease;
  width: 100%;
  max-width: 528px;
  margin: 8px 0 0 0;
}

@media (hover: hover) and (pointer: fine) {
  .dialog-submit-new:hover {
    background-color: var(--lime-active);
  }
}

.dialog-submit-new:active {
  transform: scale(0.96);
}

/* Staggered Content Animation on Open */
@keyframes booking-slide-up-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.booking-dialog[open] .booking-left-logo,
.booking-dialog[open] .booking-left-title,
.booking-dialog[open] .booking-left-subtitle,
.booking-dialog[open] .booking-benefit-item,
.booking-dialog[open] .booking-form-new > * {
  opacity: 0;
  animation: booking-slide-up-fade 400ms var(--ease-out) both;
}

/* Delays for Left Column elements */
.booking-dialog[open] .booking-left-logo { animation-delay: 30ms; }
.booking-dialog[open] .booking-left-title { animation-delay: 60ms; }
.booking-dialog[open] .booking-left-subtitle { animation-delay: 90ms; }
.booking-dialog[open] .booking-benefit-item:nth-child(1) { animation-delay: 120ms; }
.booking-dialog[open] .booking-benefit-item:nth-child(2) { animation-delay: 150ms; }
.booking-dialog[open] .booking-benefit-item:nth-child(3) { animation-delay: 180ms; }

/* Delays for Right Column elements (Form fields) */
.booking-dialog[open] .booking-form-new > .booking-field:nth-child(1) { animation-delay: 80ms; }
.booking-dialog[open] .booking-form-new > .booking-field:nth-child(2) { animation-delay: 110ms; }
.booking-dialog[open] .booking-form-new > .booking-field:nth-child(3) { animation-delay: 140ms; }
.booking-dialog[open] .booking-form-new > .booking-field:nth-child(4) { animation-delay: 170ms; }
.booking-dialog[open] .booking-form-new > .booking-field:nth-child(5) { animation-delay: 200ms; }
.booking-dialog[open] .booking-form-new > .booking-field:nth-child(6) { animation-delay: 230ms; }
.booking-dialog[open] .booking-form-new > .booking-agreement-field { animation-delay: 260ms; }
.booking-dialog[open] .booking-form-new > .dialog-submit-new { animation-delay: 290ms; }

/* Success State styling */
.booking-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  height: 100%;
  box-sizing: border-box;
}

.success-icon-wrap {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  animation: scaleIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.success-icon-wrap svg {
  width: 100%;
  height: 100%;
}

.booking-success-state h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
}

.booking-success-state p {
  font-size: 15px;
  line-height: 1.5;
  color: #666666;
  margin: 0;
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
