/* ---------- FLOATING CTA BUTTON ---------- */
.val-widget-btn {
  position: fixed;
  left: 24px;
  bottom: 28px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px 9px 11px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #e8c887, var(--gold));
  color: #14200f;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: 0 8px 20px rgba(212, 175, 106, 0.3);
  animation: val-btn-pulse 2.6s ease-in-out infinite;
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.35s;
}
.val-widget-btn.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; visibility: visible; }
.val-widget-btn:hover { transform: translateY(-2px) scale(1.03); }
.val-widget-btn-icon { display: flex; flex-shrink: 0; position: relative; z-index: 2; }
.val-widget-btn > *:not(.val-widget-btn-border) { position: relative; z-index: 2; }

/* multicolor border ring that spins in a full circle around the button */
.val-widget-btn-border {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 999px;
  padding: 1.2px;
  background: conic-gradient(from 0deg, #fff3d6, var(--gold), #a67c3d, var(--gold), #fff3d6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: val-border-spin 3.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

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

@keyframes val-btn-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(212, 175, 106, 0.35), 0 0 0 0 rgba(212, 175, 106, 0.45); }
  50% { box-shadow: 0 10px 28px rgba(212, 175, 106, 0.35), 0 0 0 14px rgba(212, 175, 106, 0); }
}

@media (max-width: 640px) {
  .val-widget-btn { left: 12px; bottom: 16px; padding: 8px 14px 8px 10px; font-size: 0.74rem; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .val-widget-btn { animation: none; }
  .val-widget-btn-border { animation: none; }
}

/* ---------- MODAL ---------- */
.val-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.val-modal-overlay.open { opacity: 1; pointer-events: auto; }

.val-modal-box {
  position: relative;
  width: 960px;
  max-width: 100%;
  max-height: 74vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px 32px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-soft) transparent;
}
.val-modal-box::-webkit-scrollbar { width: 7px; }
.val-modal-box::-webkit-scrollbar-track { background: transparent; }
.val-modal-box::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 999px; }
.val-modal-overlay.open .val-modal-box { transform: translateY(0) scale(1); }

.val-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.val-modal-close:hover { color: var(--gold); border-color: var(--gold-soft); }

.val-modal-eyebrow { color: var(--gold); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 4px; }
.val-modal-title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 4px; }
.val-modal-sub { color: var(--text-muted); font-size: 0.84rem; margin: 0 0 16px; }

/* step progress dots */
.val-steps { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.val-step-dot { flex: 1; height: 4px; border-radius: 999px; background: rgba(var(--fg-rgb), 0.1); transition: background 0.2s ease; }
.val-step-dot.done, .val-step-dot.active { background: var(--gold); }

.val-step-label { font-size: 0.72rem; color: var(--text-muted); margin: 0 0 16px; }

.val-field-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 16px; margin-bottom: 0; }
.val-field-grid .span-2 { grid-column: span 2; }
.val-field-grid .span-3 { grid-column: 1 / -1; }
.val-field label { display: flex; flex-direction: column; gap: 5px; font-size: 0.76rem; color: var(--text-muted); margin-bottom: 8px; }
.val-field-hint { font-size: 0.68rem; font-weight: 400; opacity: 0.7; }
.val-field input, .val-field select, .val-field textarea {
  background: rgba(var(--fg-rgb), 0.04);
  border: 1px solid var(--card-border);
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
}
.val-field input:focus, .val-field select:focus, .val-field textarea:focus { outline: none; border-color: var(--gold-soft); }
.val-field input.val-input-invalid { border-color: #e0665f; }
.val-inline-error { display: block; color: #e0665f; font-size: 0.72rem; margin-top: 4px; min-height: 14px; }

.val-phone-wrap { position: relative; }
.val-phone-wrap input { padding-right: 34px; width: 100%; }
.val-phone-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.val-phone-spinner {
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(212, 175, 106, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: val-phone-spin 0.6s linear infinite;
}
@keyframes val-phone-spin { to { transform: rotate(360deg); } }
.val-field textarea { resize: vertical; min-height: 56px; }
.val-checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--text); margin-bottom: 10px; }
.val-checkbox-row input { width: 16px; height: 16px; accent-color: var(--gold); }
.val-sub-field { margin-left: 26px; margin-top: -4px; }

.val-modal-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.val-modal-actions .btn-ghost { color: var(--text-muted); }
.val-error-text { color: #e0665f; font-size: 0.8rem; margin: 0 0 12px; min-height: 16px; }

/* photo upload */
.val-drop {
  border: 1.5px dashed var(--card-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.84rem;
  margin-bottom: 10px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.val-drop:hover, .val-drop.dragover { border-color: var(--gold-soft); color: var(--gold); }
.val-photo-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.val-photo-item { position: relative; width: 72px; height: 60px; border-radius: 10px; background-size: cover; background-position: center; }
.val-photo-item .val-remove-photo {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #e0665f; color: #fff; border: none;
  font-size: 12px; line-height: 1; cursor: pointer;
}
.val-photo-uploading { font-size: 0.76rem; color: var(--gold); margin: -8px 0 14px; }

/* success screen */
.val-success { text-align: center; padding: 20px 0 6px; }
.val-success-icon { width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(135deg, #e8c887, var(--gold)); color: #14200f; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.val-success h3 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 10px; }
.val-success p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin: 0 0 22px; }

@media (max-width: 640px) {
  .val-field-grid { grid-template-columns: 1fr; }
  .val-field-grid .span-2, .val-field-grid .span-3 { grid-column: 1 / -1; }
  .val-modal-box { padding: 22px 18px 18px; max-height: 88vh; }
}

@media (min-width: 641px) and (max-width: 1020px) {
  .val-modal-box { width: 92vw; }
}
