/* ═══════════════════════════════════════════════
   PBRF THEME — forms.css
   Comments, search, contact, newsletter, WPForms
═══════════════════════════════════════════════ */

/* ══════════════════════════════════════════
   BASE — inputs, textarea, select, label
══════════════════════════════════════════ */
.pbrf-form-field,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--gray-900);
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-sm);
  line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="url"]:hover,
input[type="tel"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
  border-color: var(--gray-400);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(59,31,106,0.1);
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.7;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6059' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* Required asterisk */
label .required,
label abbr[title] {
  color: var(--gold);
  text-decoration: none;
  margin-left: 3px;
  font-size: 14px;
}

/* Field group */
.pbrf-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

/* Error state */
input.error,
textarea.error,
select.error {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.pbrf-field-error {
  font-size: 12px;
  color: #C0392B;
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   SUBMIT BUTTONS
══════════════════════════════════════════ */
input[type="submit"],
button[type="submit"],
.pbrf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--purple);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 13px 32px;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background .2s, transform .15s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
input[type="submit"]:hover,
button[type="submit"]:hover,
.pbrf-submit:hover {
  background: var(--purple-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,31,106,0.25);
}
input[type="submit"]:active,
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ══════════════════════════════════════════
   SEARCH FORM (WordPress default + custom)
══════════════════════════════════════════ */
.search-form {
  display: flex;
  max-width: 520px;
  margin-top: 32px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  transition: border-color .2s, box-shadow .2s;
}
.search-form:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(59,31,106,0.1);
}
.search-form label { margin: 0; }
.search-field {
  flex: 1;
  padding: 13px 16px;
  font-size: 15px;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none;
  background: #fff;
  color: var(--gray-900);
}
.search-submit {
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 24px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
  -webkit-appearance: none;
}
.search-submit:hover { background: var(--purple-mid); }

/* ══════════════════════════════════════════
   COMMENTS SECTION
══════════════════════════════════════════ */
.comments-area {
  /* max-width e padding lateral controlados pelo .pg-comments-wrapper */
  padding: 40px 0 0;
  border-top: 1px solid var(--gray-200);
}

/* Comments title */
.comments-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.comments-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── COMMENT LIST ── */

/*
  O WordPress gera esta estrutura:
  <ol class="comment-list">
    <li class="comment even thread-even depth-1" id="comment-1">
      <article class="comment-body">...</article>
      <ol class="children">
        <li class="comment ...">...</li>
      </ol>
    </li>
  </ol>

  O marcador "1." vem do <li> que fica FORA do .comment-body.
  A solução definitiva é setar list-style-type:none no <li> diretamente.
*/

/* WP gera <ol class="commentlist"> SEM hífen */
ol.commentlist,
ol.comment-list                { list-style-type: none !important; padding: 0 !important; margin: 0 0 48px 0 !important; }

ol.commentlist > li,
ol.comment-list > li           { list-style-type: none !important; padding: 0 !important; margin: 0 0 24px 0 !important; }

ol.commentlist > li:last-child,
ol.comment-list > li:last-child { margin-bottom: 0 !important; }

ol.commentlist > li::marker,
ol.comment-list > li::marker   { content: none !important; }

/* Sub-comentários — WP usa <ol class="children"> */
ol.children                    { list-style-type: none !important; padding: 0 0 0 40px !important; margin: 16px 0 0 0 !important; border-left: 2px solid var(--gray-200); }
ol.children > li               { list-style-type: none !important; padding: 0 !important; margin: 0 0 16px 0 !important; }
ol.children > li:last-child    { margin-bottom: 0 !important; }
ol.children > li::marker       { content: none !important; }

/* Individual comment card */
.comment-body {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  padding: 24px 28px;
  position: relative;
  transition: border-color .2s;
}
.comment-body:hover { border-color: rgba(59,31,106,0.2); }

/* Comment meta row */
.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gold-pale);
  display: block;
}
.fn {
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
  font-style: normal;
}
.fn a { color: var(--purple); }

.comment-metadata {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.comment-metadata a {
  font-size: 12px;
  color: var(--gray-400);
  transition: color .2s;
}
.comment-metadata a:hover { color: var(--purple); }

.comment-content p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.75;
  font-weight: 300;
}
.comment-content p + p { margin-top: 12px; }

.reply { margin-top: 14px; }
.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-light);
  letter-spacing: 0.03em;
  transition: color .2s;
}
.comment-reply-link::before { content: '↩'; font-size: 13px; }
.comment-reply-link:hover { color: var(--purple); }

.comment-awaiting-moderation {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #8A6A00;
  background: #FFF8E1;
  border: 1px solid #F0D060;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

/* ── COMMENT FORM ── */
.comment-respond {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 40px 40px;
  margin-top: 16px;
}

/* Form title */
.comment-reply-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--purple);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
/* Cancel reply link */
#cancel-comment-reply-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  font-family: var(--font-body);
  transition: color .2s;
}
#cancel-comment-reply-link:hover { color: var(--purple); }

/* "Logged in as" notice */
.comment-notes,
.logged-in-as {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: rgba(59,31,106,0.04);
  border-radius: var(--r-sm);
  border-left: 3px solid rgba(59,31,106,0.15);
}
.logged-in-as a { color: var(--purple-light); font-weight: 600; }
.logged-in-as a:hover { color: var(--purple); }

/* Form fields layout */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.comment-form-comment {
  margin-bottom: 20px;
}
.comment-form-comment label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  display: block;
}
.comment-form-comment textarea#comment {
  min-height: 160px;
  resize: vertical;
}

/* Author / Email / URL — 3-col grid */
.comment-form-author,
.comment-form-email,
.comment-form-url {
  margin-bottom: 16px;
}
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  display: block;
}

/* Group author/email/url side by side */
.comment-form > .comment-form-author,
.comment-form > .comment-form-email,
.comment-form > .comment-form-url {
  display: inline-block;
  width: calc(33.33% - 11px);
  margin-right: 16px;
  vertical-align: top;
}
.comment-form > .comment-form-url { margin-right: 0; }

/* Cookies checkbox */
.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 24px;
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
}
.comment-form-cookies-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--purple);
  cursor: pointer;
}

/* Submit row */
.form-submit {
  margin-top: 8px;
}
.form-submit #submit {
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 36px;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background .2s, transform .15s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-submit #submit:hover {
  background: var(--purple-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,31,106,0.25);
}

/* ══════════════════════════════════════════
   NEWSLETTER FORM (homepage)
══════════════════════════════════════════ */
.pb-newsletter-form form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(59,31,106,0.12);
}
.pb-newsletter-form input[type="email"] {
  flex: 1;
  padding: 15px 20px;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 15px;
  background: #fff;
}
.pb-newsletter-form button {
  background: var(--gold);
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
  padding: 15px 28px;
  border: none;
  border-radius: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s;
  -webkit-appearance: none;
}
.pb-newsletter-form button:hover { background: var(--gold-light); }

/* ══════════════════════════════════════════
   WPFORMS OVERRIDES
══════════════════════════════════════════ */
.wpforms-container .wpforms-form {
  font-family: var(--font-body);
}
.wpforms-field-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--gray-900) !important;
  margin-bottom: 6px !important;
}
.wpforms-field input,
.wpforms-field textarea,
.wpforms-field select {
  border: 1.5px solid var(--gray-200) !important;
  border-radius: var(--r-sm) !important;
  padding: 13px 16px !important;
  font-size: 15px !important;
  font-family: var(--font-body) !important;
  transition: border-color .2s, box-shadow .2s !important;
}
.wpforms-field input:focus,
.wpforms-field textarea:focus,
.wpforms-field select:focus {
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 3px rgba(59,31,106,0.1) !important;
  outline: none !important;
}
.wpforms-submit-container .wpforms-submit {
  background: var(--purple) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 13px 36px !important;
  border-radius: var(--r-sm) !important;
  border: none !important;
  transition: background .2s, transform .15s !important;
}
.wpforms-submit-container .wpforms-submit:hover {
  background: var(--purple-mid) !important;
  transform: translateY(-1px) !important;
}
.wpforms-error-container,
.wpforms-field .wpforms-error {
  color: #C0392B !important;
  font-size: 12px !important;
}
.wpforms-confirmation-container-full {
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-radius: var(--r-md);
  padding: 20px 24px;
  font-size: 15px;
  color: var(--gray-900);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .comments-area { padding: 40px 20px 60px; }
  .comment-respond { padding: 28px 20px; }
  ol.commentlist > li, ol.comment-list > li { margin-bottom: 16px !important; }
  ol.children { padding-left: 20px !important; }

  /* Stack author/email/url fields */
  .comment-form > .comment-form-author,
  .comment-form > .comment-form-email,
  .comment-form > .comment-form-url {
    display: block;
    width: 100%;
    margin-right: 0;
  }

  .comment-meta { flex-wrap: wrap; }
  .comment-metadata { margin-left: 0; }

  .pb-newsletter-form form { flex-direction: column; border-radius: var(--r-sm); overflow: visible; box-shadow: none; gap: 10px; }
  .pb-newsletter-form input[type="email"] { border: 1.5px solid var(--gray-200) !important; border-radius: var(--r-sm) !important; }
  .pb-newsletter-form button { border-radius: var(--r-sm); padding: 14px; }
}
