/* ==========================================================================
   ELEVATED ROOFING PARTNERS — booking.css
   Booking / Calendar Embed Section Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BOOKING SECTION — Full-width dark section with embedded calendar
   -------------------------------------------------------------------------- */
.booking-section {
  background-color: var(--color-surface);
  padding: var(--space-20) 0;
  position: relative;
  border-top: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
}

.booking-section__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (min-width: 1024px) {
  .booking-section__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

/* --------------------------------------------------------------------------
   2. BOOKING TEXT CONTENT (left side)
   -------------------------------------------------------------------------- */
.booking-section__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.booking-section__text .eyebrow {
  color: var(--color-gold);
}

.booking-section__text h2 {
  color: #F4F4F0;
  font-size: var(--text-4xl);
  line-height: 1.0;
}

@media (min-width: 768px) {
  .booking-section__text h2 {
    font-size: var(--text-5xl);
  }
}

.booking-section__text p {
  color: rgba(244, 244, 240, 0.72);
  font-size: var(--text-lg);
  max-width: 480px;
}

.booking-section__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.booking-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(244, 244, 240, 0.80);
}

.booking-feature::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-gold);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   3. BOOKING EMBED CONTAINER (right side)
   -------------------------------------------------------------------------- */
.booking-embed {
  background-color: var(--color-charcoal);
  border: 1px solid var(--color-border);
  padding: var(--space-2);
  min-height: 720px;
  position: relative;
  width: 100%;
  flex: 1;
}

.booking-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 700px;
  border: none;
  display: block;
}

/* Loading state before iframe loads */
.booking-embed__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-warmgray);
}

/* Fallback link for iframe blockers */
.booking-embed__fallback {
  text-align: center;
  padding: var(--space-6);
}

.booking-embed__fallback p {
  color: var(--color-warmgray);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* --------------------------------------------------------------------------
   4. COMPACT BOOKING CTA (used in other page sections)
   -------------------------------------------------------------------------- */
.booking-cta {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

.booking-cta h3 {
  color: var(--color-white);
  font-size: var(--text-2xl);
}

.booking-cta p {
  color: var(--color-warmgray);
  font-size: var(--text-sm);
  max-width: 400px;
}

@media (min-width: 768px) {
  .booking-cta {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }

  .booking-cta p {
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   5. CONTACT PAGE — Layout, Form, and Info Panel
   -------------------------------------------------------------------------- */

/* Two-column layout: form left, info right */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
  }
}

/* --------------------------------------------------------------------------
   6. CONTACT FORM
   -------------------------------------------------------------------------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background-color: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--color-text-muted);
}

.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A5A5A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   6B. FLOATING LABELS
   -------------------------------------------------------------------------- */
.form-field {
  position: relative;
}

.form-field label {
  position: absolute;
  top: 50%;
  left: var(--space-5);
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  pointer-events: none;
  transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease, top 0.2s ease;
  background-color: transparent;
  padding: 0 4px;
  line-height: 1;
}

/* Float up on focus or when filled */
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label {
  top: 0;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  color: #8B6914;
  background-color: var(--color-white);
}

/* Offwhite background match for sections using --color-bg-alt */
.section--offwhite .form-field input:focus + label,
.section--offwhite .form-field input:not(:placeholder-shown) + label {
  background-color: var(--color-white);
}

/* Textarea label: start at top-left */
.form-field textarea + label {
  top: var(--space-4);
  transform: none;
}

.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: 0;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  color: var(--color-gold);
  background-color: var(--color-white);
}

/* Select fields: static label above */
.form-field--select {
  display: flex;
  flex-direction: column;
}

.form-field--select label {
  position: static;
  transform: none;
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  pointer-events: auto;
  padding: 0;
}

/* Form message (success / error) */
.form-message {
  display: none;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.form-message--success {
  background-color: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: #1e7e4a;
}

.form-message--error {
  background-color: rgba(192, 57, 43, 0.1);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: #c0392b;
}

/* --------------------------------------------------------------------------
   7. SCHEDULE CTA PANEL (beside form)
   -------------------------------------------------------------------------- */
.contact-schedule {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  align-self: start;
}

.contact-schedule__heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-4) 0;
  white-space: nowrap;
}

.contact-schedule__subtext {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0 0 var(--space-6) 0;
}

/* --------------------------------------------------------------------------
   8. CONTACT SCHEDULE — TRUST ITEMS
   -------------------------------------------------------------------------- */
.contact-schedule__trust {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-schedule__trust-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.contact-schedule__trust-item strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.contact-schedule__trust-item a {
  color: var(--color-gold);
  text-decoration: none;
}

.contact-schedule__trust-item a:hover {
  text-decoration: underline;
}

.contact-schedule__trust-icon {
  color: var(--color-od-green);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Mobile: tame inline-styled iframe height */
@media (max-width: 767px) {
  .booking-embed iframe {
    height: 680px !important;
    min-height: 580px;
  }
}
