/* ===== ESTILOS DO FORMULÁRIO (VERSÃO LIQUID GLASS - AJUSTES DE POLIMENTO v2) ===== */

/* --- Variáveis de Design (Tokens) --- */
:root {
  --bg: #0c0b0d;
  --surface: rgba(22, 22, 24, 0.65);
  --border: rgba(255, 255, 255, 0.12);
  --chip: rgba(28, 28, 30, 0.7);
  --chip-border: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(18, 18, 20, 0.7);
  --text: #f0f1f3;
  --text-muted: #a0a5ac;
  --accent: #ff7a00;
  --accent-2: #ffa24a;
  --btn-radius: 10px;
  --fw-bold: 700;
  --e-med: .18s;
  --e-curve: cubic-bezier(.22,.61,.36,1);
}

/* --- Base e Container Principal --- */
#briefing-app {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  max-width: 720px;
  margin: 40px auto;
  padding: 24px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- Barra de Progresso CORRIGIDA (Respeitando o HTML Original) --- */
.briefing-progress {
  position: relative;
  height: 30px;
  margin-bottom: 40px;
}
.progress-track {
  position: absolute;
  top: 50%;
  left: 15px;
  right: 15px;
  transform: translateY(-50%);
  height: 3px;
  background: var(--chip-border);
  border-radius: 99px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width .4s var(--e-curve);
}
.progress-dots {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
}
.dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--chip);
  border: 1px solid var(--chip-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s var(--e-curve);
  flex-shrink: 0;
}
.dot.active {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: var(--accent);
  color: #111;
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.2);
}

/* --- Passos (Steps) e Títulos (H2) --- */
.step { display: none; opacity: 0; transition: opacity .3s ease; }
.step.active { display: block; opacity: 1; }
.step h2 {
  font-weight: var(--fw-bold);
  font-size: 2rem;
  text-align: left;
  margin-bottom: 24px;
  line-height: 1.25;
}
.step h2::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 999px;
    margin-top: 10px;
    margin-left: 0;
    margin-right: auto;
}

/* --- Campos do Formulário --- */
#step-segmento .select-wrap { margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.field-label, .group-title {
  display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; color: var(--text);
}
.group-title { margin-bottom: 12px; }

input[type="text"], input[type="email"], input[type="url"], input[type="tel"], textarea, .select-wrap select {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--chip-border);
  border-radius: var(--btn-radius);
  color: var(--text);
  font-size: 1rem;
  transition: all var(--e-med) var(--e-curve);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.2);
}
textarea { resize: vertical; min-height: 100px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff7a00' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; pointer-events: none;
}
select { appearance: none; -webkit-appearance: none; padding-right: 36px; }

/* --- Chips (Radio/Checkbox) --- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: block; position: relative; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: block;
  padding: 10px 18px;
  background: var(--chip);
  border: 1px solid var(--chip-border);
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--e-med) var(--e-curve);
  font-size: 0.95rem;
}
.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent-2);
  color: #111;
  font-weight: 600;
}
.chip:hover span { border-color: var(--border); }

/* --- Botões de Navegação --- */
.step-actions {
  display: flex; justify-content: space-between; margin-top: 32px;
  border-top: 1px solid var(--border); padding-top: 20px;
}
#step-segmento > .btn {
    width: 100%;
}
.btn {
  padding: 12px 24px;
  border-radius: var(--btn-radius); font-weight: var(--fw-bold);
  font-size: 1rem;
  cursor: pointer; border: none;
  transition: all var(--e-med) var(--e-curve);
  text-align: center;
}
.btn--primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #111; }
.btn--ghost { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text); }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { filter: brightness(1); transform: translateY(0); }

/* --- Área de Upload --- */
.briefing-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 140px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all var(--e-med) var(--e-curve);
  position: relative;
  padding: 20px;
  text-align: center;
}
.briefing-dropzone:hover, .briefing-dropzone.drag {
  border-color: var(--accent);
  background: rgba(255, 122, 0, 0.1);
}
.briefing-dropzone input[type="file"] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-help {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin: 10px 0;
  line-height: 1.4;
}
.drive-input { margin-top: 18px; }
#upload-gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.upload-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--chip); display: flex; align-items: center; justify-content: center; border: 1px solid var(--chip-border); }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- Telas de Revisão, Sucesso e Progresso --- */
.review-list { display: grid; gap: 12px; }
.review-item { padding: 14px; background: var(--input-bg); border-radius: 10px; border: 1px solid var(--chip-border); }
.review-item dt { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 6px; }
.review-item dd { margin: 0; color: var(--text); font-size: 0.95rem; }
#briefing-success, #briefing-upload-progress { text-align: center; padding: 40px 0; }
#briefing-success h2, #progress-title { font-size: 1.8rem; margin-bottom: 8px; }
#briefing-success p, #progress-text, .progress-note { color: var(--text-muted); }
#progress-bar-outer { height: 6px; background: rgba(0,0,0,0.2); border-radius: 99px; margin: 20px 0; overflow: hidden; }
#progress-bar-inner { width: 0%; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s ease; }

/* --- Validação e Tooltips --- */
.is-invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}
.chips.is-invalid {
    outline: 1px solid #e74c3c;
    border-radius: 99px;
    padding: 2px;
}
.error-message {
  display: none;
  font-size: 0.85rem;
  color: #ff8a8a;
  margin-top: 6px;
  padding-left: 10px;
}
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--chip-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: bold;
  cursor: help;
}
.tooltip-text {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: #111214;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: left;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
}
.tooltip-trigger:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
.field-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 10px 0;
  margin: 0;
  line-height: 1.4;
}

/* --- Estilos para o Upload Interativo --- */
.upload-thumb-wrap {
    position: relative;
}

.remove-file {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background-color: #111;
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background-color: #e74c3c; /* Vermelho ao passar o mouse */
    border-color: #c0392b;
    transform: scale(1.1);
}

/* --- Estilo do Aviso de Upload --- */
.fg-upload-warning {
    margin-top: 15px;
    padding: 12px 15px;
    background: var(--input-bg);
    border-radius: var(--btn-radius);
    border: 1px solid var(--accent);
    color: var(--text);
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 122, 0, 0.1);
    width: 100%;
}
.fg-upload-warning strong {
    color: var(--accent-2);
    font-weight: 700;
}


/* --- Responsividade (Ajustes para Mobile) --- */
@media (max-width: 600px) {
  #briefing-app { padding: 20px; margin: 20px auto; }
  .step h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }
  .dot { width: 28px; height: 28px; font-size: 0.8rem; }
  .progress-line { margin: 0 5px; }
  .form-group { margin-bottom: 16px; }
  .chips { justify-content: flex-start; }
  .briefing-dropzone { padding: 15px; min-height: 120px; }
  .upload-help { font-size: 0.8rem; }
  
  .step-actions { flex-direction: column; gap: 10px; padding-top: 15px; }
  .btn { width: 100%; }
}