/**
 * SOULÉPUREVANA — Contact Form Styles
 * =====================================
 * Luxury wellness aesthetic: cream/forest/gold design tokens,
 * animated field focus states, real-time error highlights,
 * loading state, and accessible success confirmation.
 */

/* ── FORM CONTAINER ── */
.pv-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── ROWS ── */
.pv-cf__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .pv-cf__row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── FIELD WRAPPER ── */
.pv-cf__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* ── LABELS ── */
.pv-cf__label {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #072515;
}

.pv-cf__required {
  color: #B45309;
  margin-left: 2px;
}

.pv-cf__optional {
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: none;
  color: #6B7280;
  margin-left: 4px;
}

/* ── INPUTS / TEXTAREA / SELECT ── */
.pv-cf__input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #FFFFFF;
  border: 1.5px solid rgba(201, 162, 39, 0.30);
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.9375rem;
  color: #121A15;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition:
    border-color 200ms ease,
    box-shadow   200ms ease,
    background   200ms ease;
}

.pv-cf__input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

.pv-cf__input:focus {
  border-color: #C9A227;
  box-shadow:
    0 0 0 3px rgba(201, 162, 39, 0.15),
    0 1px 4px rgba(7, 37, 21, 0.08);
  background: #FDFBF6;
}

/* Valid state */
.pv-cf__input--valid {
  border-color: #16A34A;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.08);
}

/* Error state */
.pv-cf__input--error {
  border-color: #DC2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10) !important;
  background: #FEF9F9 !important;
}

/* ── TEXTAREA ── */
.pv-cf__textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.65;
}

/* ── SELECT WRAPPER ── */
.pv-cf__select-wrap {
  position: relative;
}

.pv-cf__select {
  cursor: pointer;
  padding-right: 2.5rem;
}

.pv-cf__select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #C9A227;
  font-size: 1rem;
  pointer-events: none;
  user-select: none;
}

/* ── CHARACTER COUNT ── */
.pv-cf__message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pv-cf__char-count {
  font-size: 0.75rem;
  color: #9CA3AF;
  text-align: right;
  flex-shrink: 0;
  transition: color 200ms ease;
}

.pv-cf__char-count--warn {
  color: #B45309;
  font-weight: 600;
}

/* ── FIELD ERROR MESSAGES ── */
.pv-cf__error {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #DC2626;
  display: none;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.pv-cf__error:not([hidden]):not(:empty) {
  display: flex;
}

.pv-cf__error::before {
  content: "⚠";
  font-size: 0.75rem;
}

/* ── CONSENT ROW ── */
.pv-cf__consent-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.pv-cf__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.pv-cf__checkbox {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #1A6E40;
  border-radius: 4px;
}

.pv-cf__consent-text {
  font-size: 0.8125rem;
  color: #5A685F;
  line-height: 1.5;
}

.pv-cf__link {
  color: #1A6E40;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color 180ms ease;
}

.pv-cf__link:hover {
  color: #C9A227;
}

/* ── GLOBAL FORM ERROR BANNER ── */
.pv-cf__form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-left: 4px solid #DC2626;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #B91C1C;
  line-height: 1.5;
}

/* ── SUBMIT AREA ── */
.pv-cf__submit-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
}

.pv-cf__submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 200px;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #0D4A2A 0%, #1A6E40 100%);
  color: #E8C84A;
  border: none;
  border-radius: 100px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform   240ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow  240ms ease,
    background  240ms ease,
    opacity     200ms ease;
  box-shadow: 0 4px 16px rgba(13, 74, 42, 0.35);
  position: relative;
  overflow: hidden;
}

.pv-cf__submit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #072515 0%, #0D4A2A 100%);
  opacity: 0;
  transition: opacity 220ms ease;
  border-radius: inherit;
}

.pv-cf__submit-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(13, 74, 42, 0.45);
}

.pv-cf__submit-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.pv-cf__submit-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.pv-cf__submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.pv-cf__submit-text {
  position: relative;
  z-index: 1;
}

/* Spinner SVG animation */
.pv-cf__submit-spinner svg {
  width: 18px;
  height: 18px;
  animation: pvCfSpin 0.75s linear infinite;
  position: relative;
  z-index: 1;
}

.pv-cf__submit-check {
  position: relative;
  z-index: 1;
  font-size: 1rem;
}

.pv-cf__submit-note {
  font-size: 0.75rem;
  color: #9CA3AF;
  font-style: italic;
}

.pv-cf__submit-note strong {
  color: #5A685F;
  font-style: normal;
}

/* ── HONEYPOT (visually hidden from real users) ── */
.pv-cf__honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* Universal hidden enforcement */
[hidden],
.pv-contact-form[hidden],
.pv-cf__success[hidden],
.pv-cf__error[hidden],
.pv-cf__form-error[hidden],
.pv-cf__submit-spinner[hidden],
.pv-cf__submit-check[hidden] {
  display: none !important;
}

/* ── SUCCESS STATE (only shown upon confirmed message delivery) ── */
.pv-cf__success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  border: 1px solid #86EFAC;
  border-radius: 16px;
  animation: pvCfSuccessEntrance 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pv-cf__success:not([hidden]),
.pv-cf__success.is-visible {
  display: flex;
}

.pv-cf__success-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
}

.pv-cf__success-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #072515;
}

.pv-cf__success-body {
  font-size: 1rem;
  color: #166534;
  max-width: 480px;
  line-height: 1.65;
}

.pv-cf__success-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #6B7280;
  margin-top: 0.5rem;
}

/* ── SPIN KEYFRAME ── */
@keyframes pvCfSpin {
  to { transform: rotate(360deg); }
}

/* ── SUCCESS ENTRANCE KEYFRAME ── */
@keyframes pvCfSuccessEntrance {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .pv-cf__input,
  .pv-cf__submit-btn {
    transition: none;
  }
  .pv-cf__submit-spinner svg {
    animation: none;
  }
  .pv-cf__success {
    animation: none;
  }
}
