/* ============================================================
   AGENDAMENTO CREATE — MARCELO MOREIRA CORRETOR
   Aesthetic: Luxury Editorial — Dark Ink + Warm Gold Accents
   Typography 100% consistente com home.css e catalogo_imovel.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ---- CSS Custom Properties — espelha home.css / catalogo ---- */
:root {
  --ink:       #0d0d0d;
  --ink-soft:  #1a1a1a;
  --paper:     #f5f1eb;
  --paper-alt: #ede9e0;
  --gold:      #c9a84c;
  --gold-lt:   #e8c96a;
  --gold-dk:   #9b7a2e;
  --slate:     #2a2a2a;
  --mist:      #5a5550;
  --white:     #ffffff;
  --whatsapp:  #25D366;

  /* Mesmo sistema tipográfico do catálogo e da home */
  --ff-display: 'Gill Sans', 'Gill Sans MT', Calibri, sans-serif;
  --ff-body:    'Lato', system-ui, sans-serif;
  --ff-mono:    'IBM Plex Mono', monospace;

  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --success: #2d6a4f;
  --error:   #8b1a1a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============================================================
   WRAPPER — mesma linguagem visual da seção .services (dark)
   ============================================================ */
.contact-wrapper {
  min-height: 100vh;
  background: var(--ink);
  padding: 80px 8vw;
  font-family: var(--ff-body);
  font-size: 1.05rem;
  position: relative;
  overflow: hidden;
}

/* Grade decorativa idêntica à .services::before */
.contact-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Linha dourada vertical — espelha hero */
.contact-wrapper::after {
  content: '';
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--gold) 25%,
    var(--gold-lt) 60%,
    transparent 100%);
  z-index: 10;
}

/* ============================================================
   CARD PRINCIPAL DO FORMULÁRIO
   ============================================================ */
.contact-form {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 2px;
  padding: 70px;
  overflow: hidden;
}

/* Linha shimmer dourada no topo — igual ao .service-content.venda */
.contact-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-dk), var(--gold-lt), var(--gold-dk));
  background-size: 200% 100%;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ---- TÍTULO PRINCIPAL — espelha h1 do catalogo-header ---- */
.form-title {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
  margin-bottom: 16px;
}

/* Subtítulo — espelha .catalogo-header p */
.form-description {
  font-family: var(--ff-body);
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255,255,255,0.70);
  line-height: 1.75;
  text-align: center;
  margin: 0 auto 56px;
  max-width: 560px;
  background: transparent;
  border: none;
  padding: 0;
}

/* ============================================================
   SEÇÕES DO FORMULÁRIO
   ============================================================ */
.form-section {
  margin-bottom: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 2px;
  padding: 32px 36px;
  transition: border-color 0.3s ease;
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.form-section:hover {
  border-color: rgba(201,168,76,0.3);
}

/* ---- TÍTULO DAS SEÇÕES ---- */
.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 28px;
  font-weight: 500;
}

.section-title::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.section-title i {
  color: var(--gold);
  font-size: 0.78rem;
  width: auto;
}

/* ============================================================
   GRID DE CAMPOS
   ============================================================ */
.section-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  align-items: start;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- LABELS ---- */
label {
  font-family: var(--ff-mono);
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2px;
}

/* ============================================================
   INPUTS COM ÍCONE
   ============================================================ */
.icon-input {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.icon-input:hover {
  border-color: rgba(201,168,76,0.45);
  background: rgba(255,255,255,0.10);
}

.icon-input:focus-within {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

.icon-input i {
  position: absolute;
  left: 14px;
  color: rgba(201,168,76,0.45);
  font-size: 0.82rem;
  z-index: 2;
  transition: color 0.25s ease;
  pointer-events: none;
}

.icon-input:focus-within i {
  color: var(--gold);
}

/* Inputs, selects e textareas */
.icon-input input,
.icon-input select,
.icon-input textarea {
  width: 100%;
  padding: 14px 16px 14px 42px;
  border: none;
  background: transparent;
  font-family: var(--ff-body);
  font-size: 1.0rem;
  font-weight: 400;
  color: var(--white);
  outline: none;
  letter-spacing: 0.01em;
}

.icon-input input::placeholder,
.icon-input textarea::placeholder {
  color: rgba(255,255,255,0.25);
  font-weight: 400;
}

.icon-input input[type="date"]::-webkit-calendar-picker-indicator,
.icon-input input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.4);
  cursor: pointer;
}

.icon-input select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
}

.icon-input select option {
  background: var(--ink-soft);
  color: var(--white);
  font-weight: 400;
}

.icon-input select:invalid,
.icon-input select option[value=""] {
  color: rgba(255,255,255,0.3);
}

.icon-input textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}

.icon-input input:disabled,
.icon-input select:disabled,
.icon-input textarea:disabled {
  color: rgba(255,255,255,0.2);
  cursor: not-allowed;
}

.icon-input:has(select:disabled),
.icon-input:has(input:disabled) {
  opacity: 0.4;
  border-color: rgba(201,168,76,0.08);
}

/* ============================================================
   INFORMAÇÕES AUXILIARES
   ============================================================ */
.form-section small,
#horario-info {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  margin-top: 6px;
  display: block;
  padding: 0;
  background: transparent;
  border: none;
  text-transform: uppercase;
}

#horario-info[style*="f59e0b"],
#horario-info[style*="amber"] {
  color: var(--gold) !important;
}

#horario-info[style*="16a34a"],
#horario-info[style*="green"] {
  color: #7ecba1 !important;
}

#horario-info[style*="dc3545"],
#horario-info[style*="red"] {
  color: #e07070 !important;
}

/* ============================================================
   ESTADOS DE VALIDAÇÃO
   ============================================================ */
.form-group.has-error .icon-input {
  border-color: rgba(220,80,80,0.6);
}

.form-group.has-error .icon-input i {
  color: #e07070;
}

.form-group.has-success .icon-input {
  border-color: rgba(100,200,140,0.5);
}

.form-group.has-success .icon-input i {
  color: #7ecba1;
}

/* Mensagens de erro */
.error {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #e07070;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.error::before {
  content: '—';
  color: var(--gold);
}

#id_hora_agendamento option:disabled {
  color: rgba(255,255,255,0.25);
  font-style: italic;
}

/* ============================================================
   BOTÃO DE SUBMIT
   ============================================================ */
.btn-submit {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 32px;
  height: 48px;
  background: var(--gold);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 1px;
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  margin: 48px auto 0;
  box-sizing: border-box;
  white-space: nowrap;
  width: fit-content;
}

.btn-submit:hover {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
  color: var(--ink);
  transform: translateX(4px);
}

.btn-submit:active {
  transform: translateX(2px);
}

.btn-submit i {
  font-size: 0.85rem;
}

/* ============================================================
   BOTÃO FLUTUANTE WHATSAPP — idêntico ao da home
   ============================================================ */
@keyframes pulseWhatsApp {
  0%   { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0    rgba(37,211,102,0.6); }
  50%  { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 14px rgba(37,211,102,0);   }
  100% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0    rgba(37,211,102,0);   }
}

.whatsapp-floating-wrapper {
  position: fixed !important;
  bottom: 36px !important;
  right: 36px !important;
  left: auto !important;
  top: auto !important;
  z-index: 99999;
  transform: translateZ(0);
  will-change: auto;
}

.whatsapp-floating-btn {
  width: 64px;
  height: 64px;
  background: var(--whatsapp);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform 0.3s var(--ease-smooth), background 0.2s ease;
  animation: pulseWhatsApp 2.5s infinite;
}

.whatsapp-floating-btn:hover {
  background: #1eab55;
  transform: scale(1.1);
  animation: none;
  box-shadow: 0 12px 36px rgba(37,211,102,0.5);
}

.whatsapp-floating-btn:active { transform: scale(0.96); }

.whatsapp-floating-btn svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 768px) {
  .icon-input input,
  .icon-input select,
  .icon-input textarea {
    font-size: 16px !important;
  }

  button, .btn-submit {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(201,168,76,0.2);
  }

  .contact-wrapper {
    padding: 50px 5vw;
  }

  .contact-form {
    padding: 40px 32px;
  }

  .form-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .form-description {
    font-size: 1.0rem;
    margin-bottom: 40px;
  }

  .form-section {
    padding: 24px 20px;
    margin-bottom: 24px;
  }

  .section-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .btn-submit {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    margin-top: 36px;
  }

  .whatsapp-floating-wrapper { bottom: 16px !important; right: 16px !important; }
  .whatsapp-floating-btn { width: 56px; height: 56px; }
  .whatsapp-floating-btn svg { width: 26px; height: 26px; }
}

@media (max-width: 480px) {
  .contact-wrapper {
    padding: 32px 4vw;
  }

  .contact-form {
    padding: 28px 20px;
  }

  .form-title {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }

  .form-section {
    padding: 20px 16px;
  }

  .btn-submit {
    width: 100%;
    height: 52px;
  }

  .whatsapp-floating-btn { width: 50px; height: 50px; }
  .whatsapp-floating-btn svg { width: 24px; height: 24px; }
}

@media (max-width: 360px) {
  .contact-form {
    padding: 24px 14px;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .icon-input input,
  .icon-input select,
  .icon-input textarea {
    padding: 12px 12px 12px 38px;
  }
}