/* ============================================================
   CarBrandish — sms-signup.css
   Text/SMS sign-up page (sms-sign-up.html)
   ============================================================ */

/* ── Hero Image ── */
.sms-hero {
  position: relative;
  width: 100%;
  height: 45vw;
  min-height: 320px;
  max-height: 620px;
  overflow: hidden;
  background: var(--color-bg);
}

.sms-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.sms-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.35) 0%, rgba(5, 5, 5, 0.15) 40%, rgba(5, 5, 5, 0.85) 100%);
}

/* ── Sign Up Section ── */
.sms-signup-section {
  padding-block: var(--space-section);
}

.sms-signup-container {
  max-width: min(640px, 100%);
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sms-signup-section h1 {
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-md);
}

.sms-signup-message {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
}

.sms-signup-form {
  width: 100%;
}

/* ── Consent ── */
.sms-signup-form .form-consent {
  text-align: left;
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.sms-signup-form .form-consent label {
  color: var(--color-text-dim);
  font-size: 0.78rem;
  line-height: 1.5;
}

.sms-signup-form .form-consent label a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sms-signup-form .form-consent label a:hover {
  color: var(--color-primary);
}

.sms-signup-form .form-consent.error label {
  color: var(--color-primary);
}

/* ── Phone Row ── */
.phone-input-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Country Badge (US only for now — static, non-interactive) */
.country-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  padding: 0 0.9rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
}

.country-flag {
  font-size: 1.2em;
  line-height: 1;
}

.country-dial {
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* Phone Input */
.phone-input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 0 1rem;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
}

.phone-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.phone-input::placeholder {
  color: var(--color-text-dim);
}

.country-badge,
.phone-input {
  height: 52px;
}

/* Submit Button */
.sms-submit-btn {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 1.8rem;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.sms-submit-btn:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-glow);
}

.sms-submit-btn:active {
  background: var(--color-primary-dark);
}

.sms-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error / Success */
.sms-form-error {
  display: none;
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: #f97362;
  text-align: left;
}

.sms-form-error.visible {
  display: block;
}

.phone-input.error {
  border-color: #f97362;
}

.sms-signup-success {
  display: none;
  width: 100%;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  animation: formFadeIn 0.4s var(--ease-out);
}

.sms-signup-success.visible {
  display: block;
}

.sms-signup-success h3 {
  font-size: var(--text-h4);
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.sms-signup-success p {
  color: var(--color-text-muted);
}

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

/* ── Responsive ── */
@media (max-width: 767px) {
  .sms-hero {
    height: 100vw;
  }

  .sms-signup-section h1 {
    font-size: 8vw;
  }

  .phone-input-row {
    flex-wrap: wrap;
  }

  .country-badge {
    order: 1;
  }

  .phone-input {
    flex: 1 1 120px;
    order: 2;
  }

  .sms-submit-btn {
    order: 3;
    flex: 1 1 100%;
    margin-top: 0.6rem;
  }
}
