/* ============================================================
   Pynwheel Order Form — Official Brand Theme
   Colors: Blue #1684c2, Orange #f4a01c, White/Light BG
   Fonts: Montserrat (headings), Open Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@400;500;600&display=swap');

/* ── Reset & Root ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #1684c2;
  --blue-dark: #0f6aa0;
  --blue-light: #e8f4fb;
  --blue-mid: #d0eaf7;
  --orange: #f4a01c;
  --orange-dark: #d98a10;
  --orange-light: #fff7e6;

  --gray-900: #1a1a2e;
  --gray-700: #3d4559;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f6f9;
  --gray-50: #f9fbfd;
  --white: #ffffff;

  --red: #e53935;
  --red-light: #fdecea;
  --green: #2e7d32;
  --green-light: #e8f5e9;

  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 4px rgba(22, 132, 194, 0.08);
  --shadow-md: 0 4px 20px rgba(22, 132, 194, 0.12);
  --shadow-lg: 0 8px 40px rgba(22, 132, 194, 0.16);
  --transition: all 0.2s ease;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: transparent;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ── Embed Wrapper ────────────────────────────────────────── */
.embed-wrapper {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 12px 24px;
  box-sizing: border-box;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
  width: 100%;
  background: var(--blue);
  padding: 8px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.9);
}

.top-bar a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.top-bar a:hover {
  text-decoration: underline;
}

.top-bar-left {
  display: flex;
  gap: 20px;
  align-items: center;
}

.top-bar-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ── Header / Nav ─────────────────────────────────────────── */
header {
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  padding: 18px 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-star {
  width: 44px;
  height: 44px;
}

.logo-wordmark {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.page-title-row {
  flex: 1;
  text-align: center;
}

.page-title-row h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0;
}

.header-contact {
  font-size: 0.82rem;
  color: var(--gray-500);
  text-align: right;
}

.header-contact a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

/* ── Hero Banner ──────────────────────────────────────────── */
.hero-banner {
  width: 100%;
  background: linear-gradient(135deg, var(--blue) 0%, #0f6aa0 100%);
  padding: 36px 40px;
  text-align: center;
  color: var(--white);
}

.hero-banner h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.hero-banner p {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto;
}

/* (legacy .main-content removed — use .embed-wrapper) */

/* ── Progress Stepper ─────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-bubble {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: var(--gray-500);
  background: var(--white);
  transition: var(--transition);
}

.step-item.active .step-bubble {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(22, 132, 194, 0.15);
}

.step-item.done .step-bubble {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.step-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-top: 5px;
  font-weight: 600;
}

.step-item.active .step-label {
  color: var(--blue);
}

.step-item.done .step-label {
  color: var(--blue);
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--gray-300);
  margin: 0 8px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.step-connector.done {
  background: var(--blue);
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-300);
  overflow: hidden;
}

.card-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-300);
  padding: 14px 20px;
}

.card-header h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.card-header p {
  font-size: 0.83rem;
  color: var(--gray-500);
  margin: 4px 0 0;
}

/* ── Form Steps ───────────────────────────────────────────── */
.form-step {
  display: none;
  padding: 20px;
}

.form-step.active {
  display: block;
  animation: stepIn 0.28s ease both;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Form Fields ──────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 12px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 8px 11px;
  color: var(--gray-900);
  font-size: 0.88rem;
  font-family: 'Open Sans', sans-serif;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

/* ── Checkbox Row ─────────────────────────────────────────── */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  line-height: 1.4;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: auto;
  appearance: auto;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 132, 194, 0.12);
}

.form-group input::placeholder {
  color: var(--gray-300);
}

.form-group input.error {
  border-color: var(--red);
}

.field-error {
  font-size: 0.74rem;
  color: var(--red);
  display: none;
}

.field-error.show {
  display: block;
}

/* ── Product Cards ────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.product-option {
  display: none;
}

.product-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-300);
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  text-align: center;
}

.product-label:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.product-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--gray-100);
  transition: var(--transition);
}

.product-name {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: var(--gray-900);
}

.product-desc {
  font-size: 0.72rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.product-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--blue-light);
  color: var(--blue);
  border: 1.5px solid transparent;
}

.badge-free {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}

/* Selected state */
.product-option:checked+.product-label {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: 0 0 0 1px var(--blue), var(--shadow-md);
}

.product-option:checked+.product-label .product-icon {
  background: var(--blue);
  color: var(--white);
}

.product-option:checked+.product-label .product-name {
  color: var(--blue);
}

/* ── Price Summary ────────────────────────────────────────── */
.price-card {
  background: var(--blue-light);
  border: 1.5px solid var(--blue-mid);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 14px;
}

.price-card-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.87rem;
  color: var(--gray-700);
  padding: 4px 0;
}

.price-row.total {
  border-top: 1.5px solid var(--blue-mid);
  margin-top: 10px;
  padding-top: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.price-value {
  font-weight: 600;
}

.price-row.total .price-value {
  color: var(--blue);
  font-size: 1.1rem;
}

.price-note {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 10px;
}

/* ── Review Summary ───────────────────────────────────────── */
.review-section {
  margin-bottom: 22px;
}

.review-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--blue);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue-mid);
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.review-item label {
  font-size: 0.72rem;
  color: var(--gray-500);
  font-weight: 600;
  display: block;
}

.review-item span {
  font-size: 0.88rem;
  color: var(--gray-900);
  font-weight: 500;
}

/* ── Terms Box ────────────────────────────────────────────── */
.terms-box {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 20px 0;
}

.terms-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.terms-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.terms-check label {
  font-size: 0.82rem;
  color: var(--gray-700);
  cursor: pointer;
}

.terms-check a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.terms-check a:hover {
  text-decoration: underline;
}

/* ── Captcha ──────────────────────────────────────────────── */
.captcha-wrapper {
  margin: 16px 0;
}

/* ── Alert ────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  margin-bottom: 16px;
  font-weight: 500;
  display: block;
}

.alert.error {
  background: var(--red-light);
  border: 1.5px solid #f5c6c6;
  color: var(--red);
}

.alert.success {
  background: var(--green-light);
  border: 1.5px solid #c8e6c9;
  color: var(--green);
}

/* ── Global Alert ─────────────────────────────────────────── */
#global-alert {
  margin: 16px 20px 0;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  flex: 1;
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  letter-spacing: 0.2px;
}

.btn-secondary {
  background: var(--white);
  border: 2px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(244, 160, 28, 0.35);
}

.btn-primary:hover {
  background: var(--orange-dark);
  box-shadow: 0 6px 22px rgba(244, 160, 28, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Security Badge ───────────────────────────────────────── */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.73rem;
  color: var(--gray-500);
}

/* ── Info Strip ───────────────────────────────────────────── */
.info-strip {
  display: flex;
  gap: 0;
  background: var(--orange-light);
  border-top: 3px solid var(--orange);
  padding: 16px 32px;
}

.info-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--gray-700);
  padding: 0 16px;
  border-right: 1px solid var(--gray-300);
}

.info-item:first-child {
  padding-left: 0;
}

.info-item:last-child {
  border-right: none;
}

.info-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.info-item strong {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-900);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  width: 100%;
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 20px 32px;
  font-size: 0.78rem;
  margin-top: auto;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

footer a:hover {
  color: var(--orange);
}

/* ── Confirmation Page ────────────────────────────────────── */
.confirm-card {
  max-width: 560px;
  margin: 36px auto;
}

.confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 22px;
  box-shadow: 0 0 0 8px var(--blue-light);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-card h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 10px;
}

.confirm-card>.card>.form-step>p {
  color: var(--gray-500);
  font-size: 0.95rem;
  text-align: center;
}

.confirm-steps {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 24px 0;
}

.confirm-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 8px 0;
}

.confirm-step:not(:last-child) {
  border-bottom: 1px solid var(--gray-300);
  margin-bottom: 4px;
}

.confirm-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  margin-top: 2px;
}

.confirm-step p {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin: 0;
}

.confirm-step p strong {
  color: var(--gray-900);
}

/* ── Section Label ────────────────────────────────────────── */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  display: block;
  margin-bottom: 10px;
}

.section-block {
  margin-bottom: 16px;
}

#err-product {
  margin-top: -8px;
  margin-bottom: 12px;
}

/* ── Touch Details Box ────────────────────────────────────── */
.touch-details-box {
  background: var(--blue-light);
  padding: 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  border: 1.5px solid var(--blue-mid);
}

.touch-details-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
}

/* ── Design Upgrade Hint ──────────────────────────────────── */
.design-hint {
  margin-top: 8px;
  padding: 8px 12px;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  color: #1d4ed8;
  font-weight: 500;
}

/* ── Maps Free Banner ─────────────────────────────────────── */
.maps-free-banner {
  background: #dcfce7;
  border: 1.5px solid #22c55e;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-top: 4px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #15803d;
}

/* ── Touch Options 2-col Grid ─────────────────────────────── */
.touch-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ── Price Row Variants ───────────────────────────────────── */
.price-row.discount {
  color: #10b981;
  font-weight: 600;
}

.price-row.surcharge {
  color: #f59e0b;
  font-weight: 600;
}

.price-row.per-month {
  font-size: 0.75rem;
  color: var(--gray-500);
  padding: 2px 0;
}

.price-row.per-month span:first-child {
  padding-left: 8px;
}

/* ── Field Hint ───────────────────────────────────────────── */
.field-hint {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-top: 2px;
  display: block;
}

/* ── Existing Properties Alignment ───────────────────────── */
#existingProperties-group {
  padding-top: 22px;
}

/* ── Boutique Unit Input Grid ─────────────────────────────── */
.boutique-unit-container {
  max-height: 216px;
  overflow-y: auto;
  padding: 2px 2px 2px 0;
  margin-top: 4px;
}

.boutique-unit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.boutique-unit-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 7px;
  padding: 5px 8px;
}

.boutique-unit-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray-500);
  min-width: 20px;
  flex-shrink: 0;
}

.boutique-unit-input {
  width: 100%;
  border: none !important;
  background: transparent !important;
  font-size: 0.83rem;
  padding: 0 !important;
  outline: none;
  min-width: 0;
}

/* ── Price Strikethrough (Review) ─────────────────────────── */
.price-strikethrough {
  text-decoration: line-through;
  color: var(--gray-500);
  margin-right: 8px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 620px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-step {
    padding: 22px 18px;
  }

  .card-header {
    padding: 18px 22px;
  }

  header {
    padding: 14px 20px;
    flex-wrap: wrap;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .info-strip {
    flex-direction: column;
    gap: 12px;
  }

  .info-item {
    border-right: none;
    padding: 0;
  }

  .touch-options-grid {
    grid-template-columns: 1fr;
  }

  #existingProperties-group {
    padding-top: 0;
  }

  .form-grid.grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .form-grid.grid-3 {
    grid-template-columns: 1fr;
  }

  .top-bar {
    display: none;
  }
}