/* ============================================
   H&O Garden Visualiser — self-contained styles for the
   SEO landing pages (homepage has its own inline copy).
   Depends only on the colour tokens in site.css.
   ============================================ */

/* ---- form fields ---- */
.visualiser .form-group { margin-bottom: 18px; }
.visualiser .form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--gray-800); }
.visualiser .form-group input,
.visualiser .form-group textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 0.95rem; font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s; background: var(--gray-50);
}
.visualiser .form-group input:focus,
.visualiser .form-group textarea:focus {
  outline: none; border-color: var(--green-600); background: var(--white);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
}
.visualiser .form-group textarea { resize: vertical; min-height: 70px; }

/* ---- chips ---- */
.visualiser .form-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.visualiser .chip {
  display: inline-block; padding: 9px 14px; border: 1.5px solid var(--gray-200);
  border-radius: 50px; background: var(--gray-50); color: var(--gray-800);
  font-size: 0.86rem; font-weight: 500; font-family: 'DM Sans', sans-serif;
  cursor: pointer; transition: all 0.18s; -webkit-tap-highlight-color: transparent;
}
.visualiser .chip:hover { border-color: var(--green-600); }
.visualiser .chip.selected { background: var(--green-700); border-color: var(--green-700); color: var(--white); }

/* ---- photo drop ---- */
.visualiser .photo-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center; padding: 22px 16px;
  border: 2px dashed var(--gray-200); border-radius: var(--radius-sm);
  background: var(--gray-50); cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.visualiser .photo-drop:hover { border-color: var(--orange-500); background: #fff; }
.visualiser .photo-drop-icon { font-size: 1.5rem; line-height: 1; }
.visualiser .photo-drop-text { font-weight: 700; color: var(--green-800); font-size: 0.98rem; }
.visualiser .photo-drop-sub { font-size: 0.78rem; color: var(--gray-600); }
.visualiser .photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.visualiser .photo-previews:empty { margin-top: 0; }
.visualiser .photo-thumb {
  position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(20,48,31,0.14); background: var(--gray-200);
}
.visualiser .photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.visualiser .photo-thumb-remove {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: none;
  border-radius: 50%; background: rgba(20,48,31,0.78); color: #fff; font-size: 0.95rem;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.visualiser .photo-thumb-remove:hover { background: var(--orange-600); }

/* ---- submit button ---- */
.visualiser .form-submit, .vis-overlay .form-submit {
  width: 100%; padding: 15px; background: var(--orange-500); color: var(--white);
  border: none; border-radius: 50px; font-size: 1.02rem; font-weight: 700;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s; margin-top: 6px;
}
.visualiser .form-submit:hover, .vis-overlay .form-submit:hover {
  background: var(--orange-600); transform: translateY(-1px); box-shadow: 0 4px 15px rgba(196,109,48,0.3);
}
.visualiser .form-submit:active, .vis-overlay .form-submit:active { transform: scale(0.97); }
.visualiser .form-note { text-align: center; font-size: 0.78rem; color: var(--gray-600); margin-top: 14px; }

/* ---- before/after slider ---- */
.vis-overlay .ba-slider {
  position: relative; max-width: 750px; margin: 0 auto; border-radius: var(--radius);
  overflow: hidden; cursor: ew-resize; box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.vis-overlay .ba-before-img { display: block; width: 100%; height: 420px; object-fit: cover; }
.vis-overlay .ba-after-wrap { position: absolute; top: 0; left: 0; right: 0; bottom: 0; clip-path: inset(0 0 0 50%); }
.vis-overlay .ba-after-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.vis-overlay .ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; background: var(--white);
  transform: translateX(-50%); z-index: 10; pointer-events: none;
}
.vis-overlay .ba-handle-circle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; background: var(--white); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); font-size: 1.1rem; color: var(--green-900); font-weight: 700;
}
.vis-overlay .ba-label {
  position: absolute; bottom: 16px; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  color: var(--white); padding: 6px 18px; border-radius: 50px; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; z-index: 5;
}
.vis-overlay .ba-label-before { left: 16px; }
.vis-overlay .ba-label-after { right: 16px; }

/* ---- visualiser section ---- */
.visualiser { padding: 80px 0; background: var(--cream-dark); }
.visualiser h2 { text-align: center; font-size: 2rem; margin-bottom: 14px; color: var(--green-900); }
.visualiser h2 em { font-style: italic; color: var(--green-700); }
.vis-sub { text-align: center; color: var(--gray-600); font-size: 1.05rem; max-width: 600px; margin: 0 auto 40px; }
.vis-card {
  max-width: 640px; margin: 0 auto; background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 32px; box-shadow: 0 20px 60px rgba(20,48,31,0.08);
}
@media (max-width: 560px) { .vis-card { padding: 22px; } }
.vis-step .form-group { margin-bottom: 22px; }
.vis-chips { margin-top: 12px; }
.vis-gate { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .vis-gate { grid-template-columns: 1fr; } }

/* loading + spinner */
.vis-loader { display: flex; justify-content: center; margin: 16px 0 26px; }
.vis-spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 4px solid var(--gray-200); border-top-color: var(--green-600);
  animation: visspin 0.9s linear infinite;
}
@keyframes visspin { to { transform: rotate(360deg); } }
.vis-loading-title { text-align: center; font-weight: 700; font-size: 1.15rem; color: var(--green-900); margin-bottom: 6px; }
.vis-loading-sub { text-align: center; color: var(--gray-600); font-size: 0.9rem; }

/* result */
.vis-disclaimer {
  font-size: 0.78rem; color: var(--gray-600); text-align: center; max-width: 520px; margin: 0 auto 20px;
  line-height: 1.5; background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.vis-result-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vis-result-actions .form-submit { display: block; text-align: center; text-decoration: none; max-width: 320px; }
.vis-retry {
  background: none; border: none; color: var(--green-700); font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; text-decoration: underline; padding: 4px;
}
.vis-error-title { text-align: center; font-weight: 700; font-size: 1.1rem; color: var(--green-900); margin-bottom: 6px; }
.vis-error-sub { text-align: center; color: var(--gray-600); font-size: 0.92rem; margin-bottom: 18px; }
#visStepError { text-align: center; }
#visStepError .vis-retry { display: inline-block; }

/* full-screen overlay "page" */
.vis-overlay[hidden] { display: none; }
.vis-overlay {
  position: fixed; inset: 0; z-index: 1000; background: var(--cream);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; align-items: center; padding: 0;
  animation: visFade 0.25s ease;
}
@keyframes visFade { from { opacity: 0; } to { opacity: 1; } }
/* margin:auto vertically centres when content fits but stays scroll-safe when
   it overflows (justify-content:center would clip the top). */
.vis-overlay-inner {
  width: 100%; max-width: 680px; margin: auto;
  padding: 72px 28px 56px; position: relative;
}
@media (max-width: 560px) { .vis-overlay-inner { padding: 64px 18px 40px; } }
.vis-overlay-close {
  position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--white); border: 1px solid var(--gray-200); color: var(--green-900);
  font-size: 1.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 4px 14px rgba(20,48,31,0.1); z-index: 2;
}
.vis-overlay-brand { text-align: center; font-family: 'Fraunces', Georgia, serif; color: var(--green-900); font-size: 1.25rem; margin-bottom: 4px; }
.vis-overlay-step { width: 100%; }
.vis-overlay .vis-loader { margin: 40px 0 26px; }
.vis-overlay .vis-spinner { width: 64px; height: 64px; }
.vis-overlay .vis-loading-title { font-size: 1.4rem; }
.vis-overlay .vis-loading-sub { font-size: 1rem; max-width: 420px; margin: 8px auto 0; }
.vis-overlay #visSlider { margin-bottom: 16px; }
.vis-overlay #visSlider .ba-before-img { height: 420px; }
@media (max-width: 560px) { .vis-overlay #visSlider .ba-before-img { height: 300px; } }
.vis-overlay .vis-result-actions .form-submit { max-width: 360px; padding: 16px 28px; font-size: 1.05rem; }
.vis-result-heading { text-align: center; font-family: 'Fraunces', Georgia, serif; color: var(--green-900); font-size: 1.6rem; margin-bottom: 6px; }
.vis-result-intro { text-align: center; color: var(--gray-600); font-size: 0.98rem; max-width: 460px; margin: 0 auto 20px; }
