/* Just Heaven — booking form (strona główna + villa) */

#book .form_component {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}

#book .home_book-form {
  width: 100% !important;
  max-width: none !important;
}

/* Webflow: overflow:hidden na wrapperze ucina pola */
#book form.form_form-wrapper,
#book .form_form-wrapper {
  overflow: visible !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(12, 12, 12, 0.1);
  border-radius: 1rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  box-shadow: 0 12px 40px rgba(12, 12, 12, 0.06);
}

/* Webflow .form_form = 2 kolumny — nadpisujemy w wąskim panelu */
#book .form_form,
#book .form_form.jh-book-form-grid,
#book .jh-book-form-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: none !important;
  gap: 0.85rem !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.jh-book-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.jh-book-field.is-full,
#book .form_field-wrapper.is-full {
  grid-column: 1 / -1 !important;
}

.jh-book-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(12, 12, 12, 0.55);
  font-weight: 500;
}

.jh-book-input,
#book .jh-book-input.form_input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(12, 12, 12, 0.14);
  border-radius: 0.75rem;
  background: #fbf8f1;
  color: #0c0c0c;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin: 0 !important;
  margin-bottom: 0 !important;
}

/* iOS Safari: natywne pola dat mają wewnętrzny min-width i wychodzą poza kartę */
#book input[type="date"],
#book .jh-book-input[type="date"],
#book .form_input.is-date[type="date"] {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: block;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  background-image: none !important;
  background-position: initial !important;
  padding-right: 0.9rem !important;
}

#book input[type="date"]::-webkit-date-and-time-value {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#book input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.jh-book-input:focus {
  outline: none;
  border-color: #8f7d6b;
  box-shadow: 0 0 0 3px rgba(143, 125, 107, 0.18);
}

.booking-locked-apartment {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(12, 12, 12, 0.1);
  border-radius: 0.75rem;
  background: #fbf8f1;
}

.booking-locked-apartment__label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

.booking-locked-apartment__name {
  font-size: 1.2rem;
  font-weight: 500;
  font-family: var(--_typography---cormorant-garamond), Georgia, serif;
}

#book .form_button-wrapper {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  margin-top: 1rem;
  gap: 0.75rem;
}

#book .form_button {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

#book .button.is-form-submit,
#book .jh-book-submit {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 52px;
  padding: 0.85rem 1.25rem !important;
  border: 0;
  border-radius: 999px;
  background: #0c0c0c;
  color: #fbf8f1;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.25;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

#book .button.is-form-submit:hover,
#book .jh-book-submit:hover {
  background: #2a2a2a;
}

#book .button.is-form-submit:disabled,
#book .jh-book-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.jh-book-secure-note {
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(12, 12, 12, 0.55);
  line-height: 1.45;
}

.jh-book-secure-note strong {
  color: #0c0c0c;
  font-weight: 600;
}

#book .form_message-success,
#book .form_message-error {
  display: none;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.92rem;
  text-align: center;
}

#book .form_message-success.is-visible {
  display: block;
  background: #e8f5e9;
  color: #1b4332;
}

#book .form_message-error.is-visible {
  display: block;
  background: #fde8e8;
  color: #7f1d1d;
}

#book .home_book-subheadline p {
  color: rgba(12, 12, 12, 0.72);
}

#booking-price-summary {
  grid-column: 1 / -1;
  width: 100%;
}

.booking-price-summary {
  width: 100%;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  box-sizing: border-box;
}

.booking-price-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.booking-price-summary__label {
  color: rgba(12, 12, 12, 0.72);
}

.booking-price-summary__value {
  font-weight: 600;
}

.booking-price-summary__total {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(12, 12, 12, 0.1);
  font-size: 0.95rem;
  text-align: right;
}

.booking-price-summary__hint,
.booking-price-summary__meta {
  font-size: 0.92rem;
  line-height: 1.45;
}

.booking-price-summary__meta {
  margin-top: 0.2rem;
  color: rgba(12, 12, 12, 0.6);
}

.booking-price-summary.is-info,
.booking-price-summary.is-pending {
  background: #f3efe6;
  color: #0c0c0c;
  border: 1px solid rgba(12, 12, 12, 0.08);
}

.booking-price-summary.is-available {
  background: rgba(12, 12, 12, 0.06);
  color: #0c0c0c;
  border: 1px solid rgba(12, 12, 12, 0.1);
}

.booking-price-summary.is-unavailable {
  background: #fde8e8;
  color: #7f1d1d;
  border: 1px solid rgba(127, 29, 29, 0.15);
}

.booking-price-summary.is-loading {
  background: #f3efe6;
  color: rgba(12, 12, 12, 0.65);
  border: 1px solid rgba(12, 12, 12, 0.08);
}

/* Na szerokim ekranie: 2 kolumny pól tylko gdy formularz ma pełną szerokość */
@media (min-width: 1100px) {
  #book:not(.villa-book-section) .jh-book-form-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  #book:not(.villa-book-section) .jh-book-field.is-full,
  #book:not(.villa-book-section) .form_field-wrapper.is-full,
  #book:not(.villa-book-section) #booking-price-summary {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 991px) {
  #book .jh-book-form-grid,
  #book .form_form.jh-book-form-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  #book form.form_form-wrapper,
  #book .form_form-wrapper {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  #book .jh-book-field,
  #book .form_field-wrapper,
  #book #booking-price-summary {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
  }

  #book input[type="date"],
  #book .jh-book-input,
  #book .form_input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}
