/* ==========================================================================
   HYDROSOLAR – Enquiry Form Stylesheet (Notched Floating Labels)
   Matches hydrowarm.in/get-quote.html luxury aesthetic:
   - Floating label sits directly on the top border (notched cutout)
   - Brand Green (#11a139, #0d8a32) & Clean White (#ffffff)
   - Responsive 2-column grid
   ========================================================================== */

/* ─── Subpage Background & Fixed Navbar ──────────────────────────────── */
.subpage-body {
  background-color: #fbfdfc;
  background-image:
    radial-gradient(circle at 50% 10%, rgba(17, 161, 57, 0.05) 0%, transparent 60%),
    linear-gradient(to right, rgba(17, 161, 57, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 161, 57, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  min-height: 100vh;
}

.navbar--subpage {
  background: rgba(3, 16, 10, 0.98) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar--subpage .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
}

.navbar--subpage .nav-link:hover,
.navbar--subpage .nav-link.active {
  color: #ffffff !important;
}

/* ─── Main Form Section Container ────────────────────────────────────── */
.enquiry-simple-section {
  padding: 155px 20px 85px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enquiry-simple-container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* ─── Header: Brand Logo & Title ─────────────────────────────────────── */
.form-brand-header {
  margin-bottom: 34px;
}

.form-brand-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.25s ease;
}

.form-brand-icon-wrapper:hover {
  transform: translateY(-2px);
}

.form-brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(17, 161, 57, 0.2));
}

.form-main-heading {
  font-family: var(--font-primary, "Space Grotesk", sans-serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f1e17;
  margin-bottom: 12px;
  line-height: 1.15;
}

.form-main-subheading {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 1.08rem;
  color: #556960;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Form Card Container ────────────────────────────────────────────── */
.enquiry-form-wrapper {
  background: transparent;
  width: 100%;
}

/* ─── 2-Column Responsive Form Grid ──────────────────────────────────── */
.form-grid-2cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 22px;
  margin-bottom: 24px;
  text-align: left;
}

.form-field-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-field-group.form-field-full,
.form-field-full {
  grid-column: 1 / -1;
}

/* ─── Notched Floating Label Input Box (Exact Reference Design) ───────── */
.floating-notch-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #e1e7e4;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 52px;
  padding: 0 14px 0 0;
  cursor: text;
}

.floating-notch-box:hover {
  border-color: #cbd8d2;
}

.floating-notch-box:focus-within {
  border-color: #11a139;
  box-shadow: 0 0 0 3px rgba(17, 161, 57, 0.16);
  background: #ffffff;
}

/* Left Icon */
.field-left-icon {
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
  pointer-events: none;
  transition: color 0.2s ease;
}

.floating-notch-box:focus-within .field-left-icon {
  color: #11a139;
}

/* Native Input (Text, Tel, Number) */
.field-native-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 12px 0 0;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.94rem;
  font-weight: 500;
  color: #0f1e17;
  -moz-appearance: textfield;
}

.field-native-input::-webkit-outer-spin-button,
.field-native-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Custom Select Trigger & Hidden Select */
.field-custom-select-trigger {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 36px 0 0;
  cursor: pointer;
  user-select: none;
  outline: none;
  background: transparent;
}

.custom-select-value {
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.94rem;
  font-weight: 500;
  color: #0f1e17;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.select-notch-box {
  cursor: pointer;
}

.field-hidden-select {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  border: 0 !important;
  padding: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  overflow: hidden !important;
  z-index: -1 !important;
}

/* Native Select (Fallback) */
.field-native-select {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 36px 0 0;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.94rem;
  font-weight: 500;
  color: #0f1e17;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.field-native-select option {
  color: #0f1e17;
  background: #ffffff;
  padding: 10px;
}

/* ─── Floating Notch Label ───────────────────────────────────────────── */
.floating-notch-label {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.92rem;
  font-weight: 500;
  color: #64748b;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  padding: 0 4px;
  white-space: nowrap;
  user-select: none;
  z-index: 3;
}

.required-star {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

/* FLOATING TO THE TOP BORDER (Exact Match to hydrowarm.in/get-quote.html) */
.field-native-input:focus ~ .floating-notch-label,
.field-native-input:not(:placeholder-shown) ~ .floating-notch-label,
.field-native-select:focus ~ .floating-notch-label,
.floating-notch-box.has-value .floating-notch-label,
.floating-notch-box.dropdown-open .floating-notch-label,
.floating-notch-box:focus-within .floating-notch-label {
  top: 0;
  left: 26px;
  transform: translateY(-50%);
  font-size: 0.74rem;
  font-weight: 700;
  background: #ffffff;
  padding: 0 6px;
  letter-spacing: 0.02em;
}

/* Active focus color for top notched label */
.floating-notch-box:focus-within .floating-notch-label,
.floating-notch-box.dropdown-open .floating-notch-label {
  color: #11a139 !important;
}

/* Filled but blurred label color */
.field-native-input:not(:focus):not(:placeholder-shown) ~ .floating-notch-label,
.floating-notch-box.has-value:not(:focus-within):not(.dropdown-open) .floating-notch-label {
  color: #64748b;
}

/* Right Dropdown Chevron */
.field-right-chevron {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.floating-notch-box:focus-within .field-right-chevron,
.floating-notch-box.dropdown-open .field-right-chevron {
  color: #11a139;
  transform: rotate(180deg);
}

/* ─── Full-Width Custom Dropdown (Matches Exact Input Field Width) ───── */
.solar-custom-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #11a139;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(17, 161, 57, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  animation: dropdownSlideDown 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.solar-custom-dropdown.is-open {
  display: block;
}

.solar-custom-option {
  padding: 12px 16px;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 0.94rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}

.solar-custom-option:last-child {
  border-bottom: none;
}

.solar-custom-option:hover {
  background: #f0fdf4;
  color: #0d8a32;
  font-weight: 600;
  padding-left: 20px;
}

.solar-custom-option.is-selected {
  background: #e8f5e9;
  color: #0d8a32;
  font-weight: 700;
}

.solar-custom-option.is-selected::after {
  content: '✓';
  font-weight: 800;
  color: #11a139;
  font-size: 1rem;
}

.solar-custom-dropdown::-webkit-scrollbar {
  width: 6px;
}
.solar-custom-dropdown::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 10px;
}
.solar-custom-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.solar-custom-dropdown::-webkit-scrollbar-thumb:hover {
  background: #11a139;
}

@keyframes dropdownSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Suffix Badge for Monthly Bill */
.field-suffix-badge {
  background: #eef3f0;
  color: #3b5045;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  pointer-events: none;
  letter-spacing: 0.02em;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ─── Validation Error States ────────────────────────────────────────── */
.form-field-group.has-error .floating-notch-box {
  border-color: #dc2626 !important;
  background-color: #fffaf9;
}

.form-field-group.has-error .field-left-icon,
.form-field-group.has-error .field-right-chevron {
  color: #dc2626 !important;
}

.form-field-group.has-error .floating-notch-label {
  color: #dc2626 !important;
}

.field-error-text {
  display: none;
  font-size: 0.8rem;
  color: #dc2626;
  margin-top: 5px;
  padding-left: 4px;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
}

.form-field-group.has-error .field-error-text {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ─── Alert Banner ───────────────────────────────────────────────────── */
.form-alert-banner {
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.45;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: fadeInDown 0.3s ease;
  text-align: center;
}

.form-alert-banner.error {
  display: flex;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.form-alert-banner.success {
  display: flex;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ─── Bottom reCAPTCHA Notice ────────────────────────────────────────── */
.form-recaptcha-notice {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 8px;
  margin-bottom: 22px;
}

.form-recaptcha-notice a {
  color: #64748b;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.form-recaptcha-notice a:hover {
  color: #11a139;
}

/* ─── Large Red/Green CTA Button ─────────────────────────────────────── */
.form-cta-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-submit-estimate {
  min-width: 380px;
  max-width: 500px;
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(135deg, #0d8a32 0%, #11a139 50%, #1eb954 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-primary, "Space Grotesk", sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 28px rgba(17, 161, 57, 0.38);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-submit-estimate::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.btn-submit-estimate:hover:not(:disabled)::before {
  left: 100%;
}

.btn-submit-estimate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(17, 161, 57, 0.48);
  background: linear-gradient(135deg, #0a702a 0%, #0d8a32 50%, #11a139 100%);
}

.btn-submit-estimate:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit-estimate:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner */
.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

.btn-submit-estimate.loading .btn-spinner {
  display: inline-block;
}

.btn-submit-estimate.loading .btn-text-content {
  opacity: 0.9;
}

/* ─── Success Modal Overlay ──────────────────────────────────────────── */
.lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 18, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lead-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lead-modal-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(17, 161, 57, 0.2);
}

.lead-modal-overlay.active .lead-modal-card {
  transform: scale(1) translateY(0);
}

.lead-modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}

.lead-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-success-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #11a139;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px rgba(17, 161, 57, 0.25);
  animation: pulseScale 1.8s infinite;
}

.modal-title {
  font-family: var(--font-primary, "Space Grotesk", sans-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 22px;
}

.modal-summary-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: left;
}

.modal-summary-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 10px;
}

.modal-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.summary-item strong {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
}

.summary-item span {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  font-family: var(--font-primary, "Space Grotesk", sans-serif);
}

.modal-actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-whatsapp-action {
  width: 100%;
  padding: 14px 20px;
  background: #25d366;
  color: #ffffff;
  border-radius: 12px;
  font-family: var(--font-primary, "Space Grotesk", sans-serif);
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-action:hover {
  background: #1eb954;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.btn-modal-dismiss {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: none;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.btn-modal-dismiss:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ─── Keyframes ──────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulseScale {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ─── Responsive Styles ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .enquiry-simple-section {
    padding: 120px 16px 60px;
  }

  .form-grid-2cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-main-heading {
    font-size: 2.2rem;
  }

  .btn-submit-estimate {
    min-width: 100%;
    width: 100%;
  }

  .lead-modal-card {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .modal-summary-grid {
    grid-template-columns: 1fr;
  }
}
