/* Yashvi Konnect — WordPress overrides
   Adjustments where WP markup conventions diverge from the static design HTML. */

/* WP admin bar push */
.admin-bar .site-header { top: 32px; }
@media (max-width:782px){
  .admin-bar .site-header { top: 46px; }
}

/* Default WP block-editor aside spacing reset for our prose containers */
.prose .wp-block-image { margin: 28px 0; }
.prose .wp-block-image figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; text-align: left; }

/* Search form reset */
.search-form { display: flex; gap: 8px; }
.search-form input { padding: 12px 14px; border:1.5px solid var(--line); border-radius: var(--r); flex:1; font:inherit; }

/* WP nav menu walker fallback compatibility */
.menu, .menu li { list-style: none; padding:0; margin:0; }

/* Comment list (default WP comment template safety) */
.comment-list { list-style: none; padding:0; margin:32px 0; }
.comment-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }

/* Pagination */
.pagination { display:flex; gap: 8px; flex-wrap: wrap; margin: 48px 0 0; justify-content:center; }
.pagination .page-numbers {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:40px; height:40px; padding: 0 12px;
  border-radius:999px; background:var(--paper); border:1px solid var(--line);
  font-size:14px; font-weight:600; color:var(--ink-2);
  transition: all .2s;
}
.pagination .page-numbers:hover { border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); color: #FFF; border-color: var(--ink); }

/* Site notice / form notices */
.yk-notice {
  padding: 14px 18px; border-radius: var(--r); margin: 0 0 16px;
  background: var(--teal-soft); border: 1px solid rgba(31,142,142,.22);
  color: var(--teal-2); font-size: 14px; font-weight: 500;
}
.yk-notice.error { background:#FDECEC; border-color: rgba(192,57,43,.25); color:#9C2C20; }

/* Sub-page hero (page-hero) breadcrumbs styling for WP yoast/rankmath compatibility */
.crumbs .yoast-breadcrumb,
.crumbs .rank-math-breadcrumb { color: inherit; }

/* ============================================================
   IMAGE UPLOADS — trust-logo and avatar (ACF image fields)
   ============================================================ */
.trust-logo.trust-logo--img {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 8px;
}
.trust-logo.trust-logo--img img {
  max-height: 48px; width: auto; max-width: 100%;
  object-fit: contain;
  filter: grayscale(1) opacity(.7);
  transition: filter .2s;
}
.trust-logo.trust-logo--img:hover img { filter: grayscale(0) opacity(1); }

.avatar.avatar--photo {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}

/* Skip link */
.skip-link { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left:8px; top:8px; width:auto; height:auto; padding: 8px 16px; background:#FFF; color: var(--ink); border:2px solid var(--gold); border-radius: var(--r); z-index: 9999; box-shadow: var(--shadow); }

/* ============================================================
   ADVANCED FORMS PRO — match design's .field styling
   AFP renders forms with .af-form wrapper and ACF's .acf-field
   structure for inputs.
   ============================================================ */
.af-form { margin: 0; }
.af-fields { display: block; }

/* Outer field wrapper (acf-field) */
.af-form .acf-field {
  margin-bottom: 18px; padding: 0; border: none; background: transparent;
}
.af-form .acf-field > .acf-label {
  display: block; padding: 0; margin: 0 0 8px;
}
.af-form .acf-field > .acf-label > label {
  display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em;
  font-family: var(--sans); margin: 0;
}
.af-form .acf-field > .acf-label > .description,
.af-form .acf-field .acf-instructions,
.af-form .acf-field .description {
  font-size: 12px; color: var(--ink-4); margin-top: 6px;
}

/* Required marker */
.af-form .acf-field .acf-required { color: #C0392B; margin-left: 2px; }

/* Inputs */
.af-form input[type="text"],
.af-form input[type="email"],
.af-form input[type="tel"],
.af-form input[type="url"],
.af-form input[type="number"],
.af-form input[type="password"],
.af-form input[type="search"],
.af-form textarea,
.af-form select {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); transition: border-color .2s, box-shadow .2s;
  box-shadow: none;
}
.af-form input:focus,
.af-form textarea:focus,
.af-form select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft);
}
.af-form textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.af-form input[type="checkbox"],
.af-form input[type="radio"] {
  width: 18px; height: 18px; accent-color: var(--teal); margin: 2px 8px 0 0;
}

/* True/false (consent) — render as inline checkbox + label */
.af-form .acf-field-true-false .acf-true-false { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-3); }
.af-form .acf-field-true-false .acf-true-false label { font-weight: 400; color: var(--ink-3); }
.af-form .acf-field-true-false .message { font-size: 12px; color: var(--ink-4); margin-top: 4px; }

/* AFP submit button — make it use our .btn style */
.af-submit, .af-form-submit {
  display: flex; gap: 8px; align-items: center; justify-content: stretch;
  margin-top: 8px;
}
.af-form button[type="submit"],
.af-form input[type="submit"] {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  background: var(--ink); color: #FFF; border: none;
  font-weight: 600; font-size: 15px; letter-spacing: -.005em;
  cursor: pointer; transition: all .2s ease;
  width: 100%; justify-content: center;
}
.af-form button[type="submit"]:hover,
.af-form input[type="submit"]:hover {
  background: var(--ink-2); transform: translateY(-1px); box-shadow: var(--shadow);
}
.af-form button[type="submit"]:disabled { opacity: .65; transform: none; }

/* AFP success/error notice */
.af-success, .af-form-success,
.af-error, .af-form-error,
.af-restart, .af-form-restart {
  margin: 16px 0 0; padding: 14px 18px;
  border-radius: var(--r); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500;
}
.af-success, .af-form-success {
  background: var(--teal-soft); border-color: rgba(31,142,142,.22); color: var(--teal-2);
}
.af-error, .af-form-error {
  background: #FDECEC; border-color: rgba(192,57,43,.25); color: #9C2C20;
}

/* Two-column layout when ACF wrapper widths are set */
.af-form .acf-field { display: block; }
.af-form .acf-fields > .acf-field[data-width="50"] { float: left; width: calc(50% - 8px); }
.af-form .acf-fields > .acf-field[data-width="50"]:nth-child(odd) { margin-right: 16px; }
.af-form .acf-fields::after { content: ''; display: block; clear: both; }
@media (max-width: 600px) {
  .af-form .acf-fields > .acf-field[data-width="50"] { float: none; width: 100%; margin-right: 0; }
}

/* Footer newsletter — inverted color scheme on dark background */
.footer-newsletter .af-form .acf-field { margin-bottom: 12px; }
.footer-newsletter .af-form .acf-label { display: none; }
.footer-newsletter .af-form input[type="email"] {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #FFF;
  padding: 12px 14px;
}
.footer-newsletter .af-form input[type="email"]::placeholder { color: rgba(255,255,255,.4); }
.footer-newsletter .af-form input[type="email"]:focus { border-color: var(--gold); box-shadow: none; }
.footer-newsletter .af-form button[type="submit"] {
  background: var(--gold); color: var(--ink); margin-top: 4px;
}
.footer-newsletter .af-form button[type="submit"]:hover {
  background: var(--gold-2);
}
