/**
 * Frontend stylesheet for Al Danira Booking Enquiry
 * Interactive Doorstep Booking Widget (Light Theme)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Reset box sizing local to the widget */
.booking-widget-wrapper {
  box-sizing: border-box !important;
  font-family: 'Inter', sans-serif !important;
  background-color: #ffffff !important;
  color: #0a0c10 !important;
  -webkit-font-smoothing: antialiased !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  container-type: inline-size !important;
  container-name: booking_widget !important;
}

.booking-widget-wrapper * {
  box-sizing: border-box !important;
}

/* Container styling - optimized to prevent overflow in page builders (Elementor) */
.booking-section {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  background-color: #ffffff !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-sizing: border-box !important;
}

.booking-container {
  max-width: 500px !important; /* Exact width from the mockup design */
  margin: 0 auto !important;
  padding: 0 15px !important;
  display: block !important;
}

/* Form Side Layout */
.booking-form-wrapper {
  width: 100% !important;
}

.booking-section-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 24px !important; /* Smaller size to fit header vertically */
  font-weight: 800 !important;
  color: #0a0c10 !important; /* Dark Heading text */
  margin-bottom: 15px !important; /* Reduced space */
  letter-spacing: -0.5px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-align: center !important;
}

.booking-form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 14px !important; /* Exact gap sizing from design */
  width: 100% !important;
}

.form-full-width {
  grid-column: span 2 !important;
}

/* ==========================================================================
   Input overrides (Forces solid borders using direct grey #888888)
   ========================================================================== */

/* Target text inputs, selects, and textareas, excluding checkboxes */
.booking-widget-wrapper input:not([type="checkbox"]),
.booking-widget-wrapper select,
.booking-widget-wrapper textarea {
  background-color: #ffffff !important;
  border: 1.5px solid #888888 !important; /* Solid Medium Grey Border */
  color: #0a0c10 !important;
  display: block !important;
  width: 100% !important;
  border-radius: 6px !important;
  padding: 10px 14px !important; /* Exact padding from design */
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important; /* Exact text size from design */
  outline: none !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s ease !important;
}

.booking-widget-wrapper input:not([type="checkbox"]),
.booking-widget-wrapper select {
  height: 40px !important; /* Exact height from design */
}

.booking-widget-wrapper textarea {
  min-height: 80px !important; /* Exact textarea height from design */
  height: 80px !important;
  resize: vertical !important;
}

/* Focus effect - Turns border deep blue */
.booking-widget-wrapper input:not([type="checkbox"]):focus,
.booking-widget-wrapper select:focus,
.booking-widget-wrapper textarea:focus {
  border-color: #00509d !important;
  box-shadow: 0 0 8px rgba(0, 80, 157, 0.15) !important;
}

/* Placeholders styling */
.booking-widget-wrapper input::placeholder,
.booking-widget-wrapper textarea::placeholder {
  color: #718096 !important;
  opacity: 1 !important;
}

.booking-widget-wrapper select option {
  background-color: #ffffff !important;
  color: #0a0c10 !important;
}

/* Custom Services Dropdown menu checklist */
.custom-dropdown-container {
  position: relative !important;
  width: 100% !important;
}

.dropdown-btn {
  width: 100% !important;
  height: 40px !important; /* Exact height from design */
  background-color: #ffffff !important;
  border: 1.5px solid #888888 !important;
  border-radius: 6px !important;
  padding: 10px 14px !important; /* Exact padding from design */
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important; /* Exact font size from design */
  color: #0a0c10 !important;
  cursor: pointer !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
  user-select: none !important;
}

.dropdown-btn span {
  color: #0a0c10 !important;
}

.dropdown-btn:hover {
  border-color: #555555 !important;
}

.dropdown-btn.active {
  border-color: #00509d !important;
}

.dropdown-list-menu {
  position: absolute !important;
  top: 105% !important;
  left: 0 !important;
  width: 100% !important;
  background-color: #ffffff !important;
  border: 1px solid #888888 !important;
  border-radius: 6px !important;
  max-height: 280px !important;
  overflow-y: auto !important;
  z-index: 100 !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
  display: none;
  padding: 8px 0 !important;
}

.dropdown-item {
  display: flex !important;
  align-items: center !important;
  padding: 10px 16px !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  user-select: none !important;
  font-size: 14.5px !important;
}

.dropdown-item:hover {
  background-color: #f1f5f9 !important;
}

.dropdown-item input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  accent-color: #dfbe5f !important; /* Soft Gold checkbox */
  margin-right: 12px !important;
  cursor: pointer !important;
}

.dropdown-item-label {
  flex-grow: 1 !important;
  display: flex !important;
  justify-content: space-between !important;
  color: #0a0c10 !important;
  cursor: pointer !important;
}

.dropdown-item-label span {
  color: #0a0c10 !important;
}

.dropdown-item-price {
  color: #00509d !important; /* Deep Blue price */
  font-weight: 600 !important;
}

/* Calculator Result Block */
.calc-result-block {
  background-color: rgba(0, 80, 157, 0.05) !important;
  border: 1.5px dashed #00509d !important;
  border-radius: 6px !important;
  padding: 10px 14px !important; /* Exact padding from design */
  font-family: 'Outfit', sans-serif !important;
  font-size: 14px !important; /* Exact size from design */
  font-weight: 600 !important;
  color: #0a0c10 !important;
  margin: 4px 0 !important;
}

.calc-result-block span {
  color: #cda94c !important; /* Gold total pricing highlight */
  font-weight: 700 !important;
}

/* DateTime Slot Containers */
.field-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.field-label {
  font-family: 'Outfit', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0a0c10 !important;
}

/* Consent Check */
.consent-wrapper {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  font-size: 13.5px !important;
  color: #475569 !important;
  line-height: 1.4 !important;
  margin-top: 5px !important;
}

.consent-wrapper span {
  color: #475569 !important;
}

.consent-wrapper input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  accent-color: #dfbe5f !important;
  margin-top: 2px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}

/* Captcha Block */
/* Captcha Inline Layout */
.captcha-submit-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: 10px !important;
}

.captcha-container-inline {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.captcha-canvas-container {
  background: #f1f5f9 !important;
  border: 1px solid #888888 !important;
  border-radius: 6px !important;
  padding: 6px 14px !important;
  font-family: 'Courier New', monospace !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: 5px !important;
  color: #00509d !important;
  user-select: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important; /* Matches input heights */
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05) !important;
}

.captcha-refresh-btn {
  background: none !important;
  border: none !important;
  color: #475569 !important;
  font-size: 18px !important;
  cursor: pointer !important;
  padding: 6px !important;
  transition: color 0.3s ease !important;
}

.captcha-refresh-btn:hover {
  color: #00509d !important;
}

.submit-button {
  background: #dfbe5f !important;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border: none !important;
  border-radius: 6px !important;
  height: 40px !important; /* Matches input heights */
  padding: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 15px rgba(223, 190, 95, 0.25) !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
}

.submit-button:hover {
  background: #cda94c !important;
  box-shadow: 0 6px 20px rgba(223, 190, 95, 0.4) !important;
  transform: translateY(-1px) !important;
}

.submit-button:hover {
  background: #cda94c !important;
  box-shadow: 0 6px 20px rgba(223, 190, 95, 0.4) !important;
  transform: translateY(-1px) !important;
}

.submit-button:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Alerts */
.booking-alert {
  padding: 12px 16px !important;
  border-radius: 6px !important;
  font-size: 14.5px !important;
  display: none;
  grid-column: span 2 !important;
}

.booking-alert.success {
  background-color: rgba(37, 211, 102, 0.1) !important;
  border: 1px solid #25d366 !important;
  color: #1e7e34 !important;
}

.booking-alert.error {
  background-color: rgba(214, 0, 0, 0.08) !important;
  border: 1px solid #d60000 !important;
  color: #b30000 !important;
}

/* Legacy Brand Section Layout */
.legacy-banner-img {
  width: 100% !important;
  height: 250px !important;
  border-radius: 12px !important;
  object-fit: cover !important;
  border: 1.5px solid #00509d !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06) !important;
  margin-bottom: 28px !important;
}

.legacy-title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 30px !important;
  font-weight: 800 !important;
  color: #0a0c10 !important;
  margin-bottom: 16px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.legacy-desc {
  font-size: 15px !important;
  color: #475569 !important;
  line-height: 1.6 !important;
  margin-bottom: 12px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Error message indicators for inputs */
.booking-widget-wrapper .form-group-has-error input:not([type="checkbox"]),
.booking-widget-wrapper .form-group-has-error select,
.booking-widget-wrapper .form-group-has-error textarea,
.booking-widget-wrapper .form-group-has-error .dropdown-btn {
  border-color: #d60000 !important;
  box-shadow: 0 0 8px rgba(214, 0, 0, 0.1) !important;
}

.booking-widget-wrapper .field-error-msg {
  color: #d60000 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
  display: block !important;
}

/* Responsive settings */
@media (max-width: 991px) {
  .booking-container {
    grid-template-columns: 1fr !important;
    gap: 50px !important;
  }
}

@media (max-width: 576px) {
  .booking-form-grid {
    grid-template-columns: 1fr !important;
  }
  .form-full-width, .booking-form-grid > * {
    grid-column: span 1 !important;
  }
}

/* Container Queries for self-contained layout scaling in small columns */
@container booking_widget (max-width: 550px) {
  .booking-form-grid {
    grid-template-columns: 1fr !important;
  }
  .form-full-width, .booking-form-grid > * {
    grid-column: span 1 !important;
  }
}

