@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600&display=swap');

:root {
  --brand:       #0d406f;
  --brand-dark:  #0a3358;
  --brand-light: #e8f0f8;
  --border:      #e2e8f0;
  --text:        #2d3748;
  --muted:       #718096;
  --body-bg:     #f4f6f9;
  --success:     #38a169;
}

* { box-sizing: border-box; }

body {
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--body-bg);
  margin: 0;
  padding: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ── PAGE HEADER ── */
.pub-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.pub-header .logo { height: 38px !important; width: auto !important; max-width: none !important; }

.pub-header .header-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  margin-left: auto;
  transition: color .15s;
}

.pub-header .header-back:hover { color: var(--brand); text-decoration: none; }

/* ── PAGE WRAPPER ── */
.pub-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ── INTRO TEXT ── */
.intro-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.intro-block p:last-child { margin-bottom: 0; }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  margin-top: 28px;
}

/* ── ACCORDION (FAQ público) ── */
.faq-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }

.faq-list .accordion-item {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  overflow: hidden;
}

.faq-list .accordion-button {
  background: #fff !important;
  color: #2d3748 !important;   /* hard-coded so custom CSS can't make text invisible */
  font-family: 'Rubik', sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 14px 20px !important;
  width: 100% !important;
  text-align: left !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  border-radius: 10px !important;
  transition: background .15s, color .15s;
}

.faq-list .accordion-button::after {
  content: '' !important;
  flex-shrink: 0;
  width: 18px !important;
  height: 18px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 18px !important;
  transition: transform .2s;
}

.faq-list .accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}

.faq-list .accordion-button:not(.collapsed) {
  background: #fff !important;
  color: #0d406f !important;
  border-radius: 10px 10px 0 0 !important;
}

.faq-list .accordion-body {
  padding: 14px 20px 18px !important;
  font-size: 13.5px;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  color: #2d3748 !important;
  background: #fff !important;
}

.faq-list .accordion-body p:last-child { margin-bottom: 0; }

/* ── ACTION CARDS (bottom of FAQ) ── */
.pub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

@media (max-width: 580px) {
  .pub-actions { grid-template-columns: 1fr; }
}

.action-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}

.action-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.action-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ── BUTTONS ── */
.btn-primary-pub {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  text-align: center;
}

.btn-primary-pub:hover { background: var(--brand-dark); color: #fff !important; text-decoration: none; }

button.btn-primary-pub { width: auto; }

/* ── INPUTS ── */
label {
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  display: block;
  margin-bottom: 5px;
}

.form-control,
.form-control-css {
  display: block;
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  font-family: 'Rubik', sans-serif;
  transition: border-color .15s, box-shadow .15s;
  height: auto;
  line-height: 1.5;
}

.form-control:focus,
.form-control-css:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13,64,111,.1);
  outline: none;
}

select.form-control { height: 40px; }
textarea.form-control { min-height: 110px; resize: vertical; }

/* ── RADIO / CHECKBOX ── */
.form-check { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: #fff; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: background .15s, border-color .15s; }
.form-check:hover { background: var(--brand-light); border-color: var(--brand); }
.form-check-input { margin: 0; flex-shrink: 0; accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.form-check-label { margin: 0; font-weight: 400; font-size: 14px; cursor: pointer; }
.form-check-input:checked + .form-check-label { color: var(--brand); font-weight: 500; }

/* ── FORM SECTION ── */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.form-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-card-title i { font-size: 15px; }

.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.mb-3 { margin-bottom: 14px; }

/* ── CONDITIONAL FIELDS (indented) ── */
.conditional-fields {
  border-left: 3px solid var(--brand-light);
  padding-left: 16px;
  margin-top: 12px;
}

/* ── TESTEMUNHAS ── */
.testemunha-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.testemunha-row input { flex: 1; }
.btn-remove-testemunha { background: #fee2e2; border: none; color: #e53e3e; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s; }
.btn-remove-testemunha:hover { background: #fecaca; }
.btn-add-testemunha { background: var(--brand-light); border: 1px solid #c7d9ed; color: var(--brand); font-size: 13px; font-weight: 500; padding: 9px 18px; border-radius: 8px; cursor: pointer; margin-top: 8px; font-family: 'Rubik', sans-serif; transition: background .15s, border-color .15s, box-shadow .15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-add-testemunha:hover { background: #d4e6f7; border-color: var(--brand); box-shadow: 0 1px 3px rgba(13,64,111,.12); }
.btn-add-testemunha i { font-size: 12px; }

/* ── DROPZONE ── */
.dropzone-pub {
  border: 2px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  padding: 28px 16px;
  background: #fafbfc;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.dropzone-pub:hover, .dropzone-pub.dz-drag-hover {
  border-color: var(--brand);
  background: var(--brand-light);
}

.dropzone-pub .dz-message { margin: 0; }
.dropzone-pub-icon { font-size: 28px; color: var(--muted); margin-bottom: 8px; }
.dropzone-pub p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ── TERMS MODAL ── */
.terms-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; }
.terms-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.terms-modal-box { position: relative; background: #fff; border-radius: 14px; width: 100%; max-width: 720px; max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.terms-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px; color: var(--text); }
.terms-modal-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.terms-modal-close:hover { color: var(--text); }
.terms-modal-body { padding: 20px 24px; overflow-y: auto; }
.terms-modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

/* Conteúdo do regulamento dentro do modal */
.reg-content { font-size: 14px; line-height: 1.7; color: var(--text); }
.reg-content h1, .reg-content h2, .reg-content h3 { margin: 1.2em 0 .5em; font-weight: 700; color: var(--text); }
.reg-content h2 { font-size: 17px; }
.reg-content h3 { font-size: 15px; }
.reg-content p { margin-bottom: .6em; }
.reg-content ul, .reg-content ol { padding-left: 1.4em; margin-bottom: .6em; }

/* ── TERMS ── */
.terms-check { display: flex; align-items: flex-start; gap: 10px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.terms-check input[type="checkbox"] { margin-top: 1px; flex-shrink: 0; accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.terms-check label { font-weight: 400; font-size: 13.5px; margin: 0; cursor: pointer; }

/* ── SUBMIT AREA ── */
.submit-area { margin-top: 24px; text-align: center; }
.submit-area .btn-send { font-family: 'Rubik', sans-serif; background: var(--brand); color: #fff; border: none; padding: 12px 40px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; width: 100%; }
.submit-area .btn-send:hover { background: var(--brand-dark); }

/* ── SUCCESS STATE ── */
.success-box {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 32px;
}

.success-icon { font-size: 48px; color: var(--success); margin-bottom: 16px; }
.success-box h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.success-box p { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.success-hash { font-size: 22px; font-weight: 700; color: var(--brand); letter-spacing: .08em; margin: 16px 0; }
.success-note { font-size: 13px; color: var(--muted); max-width: 420px; margin: 0 auto 24px; }

/* ── CONSULTA ── */
.consult-form-inline { display: flex; gap: 8px; }
.consult-form-inline input { flex: 1; }
.consult-form-inline button { white-space: nowrap; }

/* ── FILE CHIPS (consulta + attachments) ── */
.file-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--brand-light); color: var(--brand);
    border: 1px solid #c7d9ed; border-radius: 20px;
    padding: 4px 12px; font-size: 12.5px; font-weight: 500;
    text-decoration: none; transition: background .15s, border-color .15s;
}
.file-chip:hover { background: #d4e6f7; border-color: var(--brand); color: var(--brand); text-decoration: none; }
