/**
 * ACBL Class Finder – Styles
 *
 * All selectors are scoped under .acbl-class-finder (applied via body_class)
 * to prevent conflicts with WordPress theme and admin-bar styles.
 * Header and footer use dedicated .acbl-cf-* classes to avoid collisions
 * with bare <header>/<footer> element selectors in the parent theme.
 *
 * @package Zelle-pro-child
 * @since   1.0.0
 */

/* ── SCOPED RESET ──────────────────────────────────────── */
.acbl-class-finder *,
.acbl-class-finder *::before,
.acbl-class-finder *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS CUSTOM PROPERTIES ─────────────────────────────── */
.acbl-class-finder {
  --navy-dark:  #1C2455;
  --navy:       #00539B;
  --gold:       #F4B31B;
  --teal:       #4EB4C2;
  --orange:     #F26541;
  --green:      #ACC66B;
  --white:      #ffffff;
  --gray-light: #f4f6f9;
  --gray-mid:   #e2e6ed;
  --gray-text:  #555e6e;
  --text:       #1a2133;
}

/* ── BASE ──────────────────────────────────────────────── */
.acbl-class-finder {
  font-family: 'Open Sans', Arial, sans-serif;
  background: var(--gray-light);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* ── HEADER ────────────────────────────────────────────── */
.acbl-cf-header {
  background: var(--navy-dark);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  text-align: left !important;
}

.acbl-cf-header img {
  height: 36px;
}

/* ── PAGE HERO ─────────────────────────────────────────── */
.acbl-class-finder .hero {
  background: var(--navy);
  color: var(--white);
  padding: 36px 32px 28px;
  border-bottom: 4px solid var(--gold);
  text-align: left !important;
  font-size: 15px !important;
  -webkit-text-stroke: 0 !important;
  -webkit-text-stroke-width: 0 !important;
}

.acbl-class-finder .hero h1 {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 8px;
  letter-spacing: -0.3px !important;
  line-height: 1.6 !important;
}

.acbl-class-finder .hero p {
  font-size: 14px !important;
  opacity: 0.88;
  max-width: 680px;
  line-height: 1.6 !important;
  font-weight: 400 !important;
}

.acbl-class-finder .hero p a {
  color: var(--gold);
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  text-decoration: underline !important;
}

/* ── LAYOUT ────────────────────────────────────────────── */
.acbl-class-finder .page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ── FILTERS ───────────────────────────────────────────── */
.acbl-class-finder .filters-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-mid);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.acbl-class-finder .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.acbl-class-finder .filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.acbl-class-finder .filter-group select,
.acbl-class-finder .filter-group input[type="text"],
.acbl-class-finder .filter-group input[type="number"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-mid);
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231C2455' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.acbl-class-finder .filter-group input[type="text"] {
  background-image: none;
}

.acbl-class-finder .filter-group select:focus,
.acbl-class-finder .filter-group input[type="text"]:focus,
.acbl-class-finder .filter-group input[type="number"]:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 83, 155, 0.12);
}

/* Checkbox filter group */
.acbl-class-finder .filter-group--checkbox {
  display: flex;
  align-items: flex-end;
  padding-bottom: 2px;
}

.acbl-class-finder .filter-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acbl-class-finder .filter-checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.acbl-class-finder .filter-checkbox-wrap label {
  display: inline;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-dark);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}

/* Location + radius row */
.acbl-class-finder .radius-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.acbl-class-finder .radius-row .filter-group {
  flex: 1;
}

.acbl-class-finder #zip-group,
.acbl-class-finder #radius-group {
  display: none;
}

/* Filter action buttons */
.acbl-class-finder .filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.acbl-class-finder .btn-search {
  background: var(--navy-dark);
  color: var(--white);
  border: none;
  padding: 10px 28px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}

.acbl-class-finder .btn-search:hover {
  background: var(--navy);
}

.acbl-class-finder .btn-clear {
  background: none;
  border: 1px solid var(--gray-mid);
  color: var(--gray-text);
  padding: 10px 20px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.acbl-class-finder .btn-clear:hover {
  border-color: var(--navy);
  color: var(--navy);
}

/* ── RESULTS BAR ───────────────────────────────────────── */
.acbl-class-finder .results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.acbl-class-finder .results-count {
  font-size: 14px;
  color: var(--gray-text);
}

.acbl-class-finder .results-count strong {
  color: var(--navy-dark);
}

/* ── CLASS CARDS ───────────────────────────────────────── */
.acbl-class-finder .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.acbl-class-finder .class-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-mid);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}

.acbl-class-finder .class-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.acbl-class-finder .card-top {
  background: var(--navy-dark);
  padding: 16px 18px 14px;
  position: relative;
  text-align: left !important;
}

.acbl-class-finder .card-top.best-practices {
  border-left: 4px solid var(--gold);
}

.acbl-class-finder .card-course-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.3;
  padding-right: 80px;
  text-align: left !important;
}

.acbl-class-finder .card-teacher-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left !important;
  align-items: flex-start;
}

.acbl-class-finder .card-teacher-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.acbl-class-finder .card-teacher-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.acbl-class-finder .cert-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.acbl-class-finder .cert-badge-bp {
  background: var(--gold) !important;
  color: var(--navy-dark);
}

.acbl-class-finder .cert-badge-curriculum {
  background: var(--teal);
  color: var(--white);
}

.acbl-class-finder .bp-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.acbl-class-finder .card-body {
  padding: 14px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left !important;
  align-items: stretch;
}

.acbl-class-finder .card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.acbl-class-finder .pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.acbl-class-finder .pill-level {
  background: #e8f0fb;
  color: var(--navy);
}

.acbl-class-finder .pill-curriculum {
  background: #edf6e2;
  color: #5a7a2a;
}

.acbl-class-finder .pill-firstfree {
  background: #fff3e0;
  color: #b45309;
}

.acbl-class-finder .card-description {
  font-size: 13px;
  color: var(--gray-text);
  line-height: 1.5;
  text-align: left !important;
}

.acbl-class-finder .card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--gray-mid);
  padding-top: 10px;
}

.acbl-class-finder .meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-text);
  text-align: left !important;
  justify-content: flex-start;
}

.acbl-class-finder .meta-row .meta-website-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
}

.acbl-class-finder .meta-row .meta-website-link:hover {
  color: var(--navy-dark);
}

.acbl-class-finder .meta-row.meta-schedule {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.acbl-class-finder .meta-icon {
  width: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.55;
}

.acbl-class-finder .card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--gray-mid);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  text-align: left !important;
}

.acbl-class-finder .btn-contact {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.acbl-class-finder .btn-contact:hover {
  background: var(--navy-dark);
}

.acbl-class-finder .btn-website {
  background: none;
  border: 1px solid var(--gray-mid);
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s;
}

.acbl-class-finder .btn-website:hover {
  border-color: var(--navy);
}

/* Distance badge (rendered in card meta) */
.acbl-class-finder .dist-badge {
  font-size: 12px;
  color: var(--gray-text);
  margin-left: auto;
}

/* Contact reveal panel */
.acbl-class-finder .contact-info {
  display: none;
  background: var(--gray-light);
  border-top: 1px solid var(--gray-mid);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
}

.acbl-class-finder .contact-info.open {
  display: block;
}

.acbl-class-finder .contact-info a {
  color: var(--navy);
  text-decoration: none;
}

.acbl-class-finder .contact-info a:hover {
  text-decoration: underline;
}

/* ── STATE MESSAGES ────────────────────────────────────── */
.acbl-class-finder .state-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-text);
}

.acbl-class-finder .state-msg .icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.acbl-class-finder .state-msg h3 {
  font-size: 18px;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.acbl-class-finder .state-msg p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}

.acbl-class-finder .state-msg p a {
  color: var(--navy);
}

.acbl-class-finder .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-mid);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: acbl-cf-spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes acbl-cf-spin {
  to { transform: rotate(360deg); }
}

/* ── VIEW TOGGLE ───────────────────────────────────────── */
.acbl-class-finder .view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.acbl-class-finder #view-toggle {
  display: none;
}

.acbl-class-finder .btn-toggle {
  background: none;
  border: 1px solid var(--gray-mid);
  color: var(--gray-text);
  padding: 7px 16px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.acbl-class-finder .btn-toggle.active {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--white);
}

.acbl-class-finder .btn-toggle:not(.active):hover {
  border-color: var(--navy);
  color: var(--navy);
}

/* ── MAP ───────────────────────────────────────────────── */
.acbl-class-finder #map-container {
  display: none;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-mid);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.acbl-class-finder #map {
  height: 520px;
  width: 100%;
}

.acbl-class-finder .leaflet-popup-content {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  min-width: 200px;
}

.acbl-class-finder .popup-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy-dark);
  margin-bottom: 2px;
}

.acbl-class-finder .popup-teacher {
  color: var(--gray-text);
  font-size: 12px;
  margin-bottom: 8px;
}

.acbl-class-finder .popup-detail {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 3px;
}

.acbl-class-finder .popup-bp {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}

/* ── FOOTER ────────────────────────────────────────────── */
.acbl-cf-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 20px;
  font-size: 12px;
  margin-top: 40px;
}

.acbl-cf-footer a {
  color: var(--gold);
  text-decoration: none;
}

/* ── THEME OVERRIDES ───────────────────────────────────── */
/*
 * The Zerif Pro parent theme loads Bootstrap CSS via wp_head().
 * The selectors below use body.acbl-class-finder for extra
 * specificity so they reliably win over the theme defaults.
 */

body.acbl-class-finder,
body.acbl-class-finder h1,
body.acbl-class-finder h2,
body.acbl-class-finder h3,
body.acbl-class-finder h4,
body.acbl-class-finder p,
body.acbl-class-finder span,
body.acbl-class-finder a,
body.acbl-class-finder div,
body.acbl-class-finder button,
body.acbl-class-finder select,
body.acbl-class-finder input {
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-style: normal !important;
}

body.acbl-class-finder h1,
body.acbl-class-finder h3 {
  text-transform: none !important;
}

body.acbl-class-finder .filter-group label,
body.acbl-class-finder .filter-checkbox-wrap label {
  text-align: left !important;
}

/* Class result cards: theme often centers .card / headings — force left like reference UI */
body.acbl-class-finder .class-card,
body.acbl-class-finder .class-card h1,
body.acbl-class-finder .class-card h2,
body.acbl-class-finder .class-card h3,
body.acbl-class-finder .class-card p {
  text-align: left !important;
}

body.acbl-class-finder .contact-info {
  text-align: left !important;
}

/*
 * Filter controls — match standalone index.html (Bootstrap / theme use
 * different line-height, height, and backgrounds on form-control).
 */
body.acbl-class-finder .filter-group select,
body.acbl-class-finder .filter-group input[type="text"],
body.acbl-class-finder .filter-group input[type="number"] {
  width: 100% !important;
  max-width: none !important;
  padding: 9px 12px !important;
  border: 1px solid #e2e6ed !important;
  border-radius: 5px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: normal !important;
  height: auto !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  color: #1a2133 !important;
  background-color: #fff !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

body.acbl-class-finder .filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231C2455' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
}

body.acbl-class-finder .filter-group input[type="text"],
body.acbl-class-finder .filter-group input[type="number"] {
  background-image: none !important;
}

body.acbl-class-finder .filter-group select:focus,
body.acbl-class-finder .filter-group input[type="text"]:focus,
body.acbl-class-finder .filter-group input[type="number"]:focus {
  outline: none !important;
  border-color: #00539b !important;
  box-shadow: 0 0 0 3px rgba(0, 83, 155, 0.12) !important;
}

body.acbl-class-finder .filter-group label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #1c2455 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 6px !important;
  line-height: normal !important;
}

body.acbl-class-finder .filter-checkbox-wrap input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  accent-color: #00539b !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}

body.acbl-class-finder .filter-checkbox-wrap label {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1c2455 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
}

body.acbl-class-finder .btn-search,
body.acbl-class-finder .btn-search:hover,
body.acbl-class-finder .btn-search:focus,
body.acbl-class-finder .btn-search:active {
  background-color: #1C2455 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 5px !important;
  padding: 10px 28px !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  line-height: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  outline: none;
}

body.acbl-class-finder .btn-search:hover {
  background-color: #00539B !important;
}

body.acbl-class-finder .btn-clear,
body.acbl-class-finder .btn-clear:hover,
body.acbl-class-finder .btn-clear:focus,
body.acbl-class-finder .btn-clear:active {
  background-color: transparent !important;
  color: #555e6e !important;
  border: 1px solid #e2e6ed !important;
  border-radius: 5px !important;
  padding: 10px 20px !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  outline: none;
}

body.acbl-class-finder .btn-clear:hover {
  border-color: #00539B !important;
  color: #00539B !important;
}

body.acbl-class-finder .btn-contact,
body.acbl-class-finder .btn-contact:hover,
body.acbl-class-finder .btn-contact:focus,
body.acbl-class-finder .btn-contact:active {
  background-color: #00539B !important;
  color: #fff !important;
  border: none !important;
  border-radius: 5px !important;
  padding: 8px 18px !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

body.acbl-class-finder .btn-contact:hover {
  background-color: #1C2455 !important;
}

body.acbl-class-finder .btn-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: normal !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  transition: border-color 0.15s, color 0.15s, background 0.15s !important;
}

body.acbl-class-finder .btn-toggle:not(.active),
body.acbl-class-finder .btn-toggle:not(.active):hover,
body.acbl-class-finder .btn-toggle:not(.active):focus,
body.acbl-class-finder .btn-toggle:not(.active):active {
  background-color: transparent !important;
  border: 1px solid #e2e6ed !important;
  color: #555e6e !important;
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 7px 16px !important;
}

body.acbl-class-finder .btn-toggle:not(.active):hover {
  border-color: #00539b !important;
  color: #00539b !important;
  background-color: transparent !important;
}

body.acbl-class-finder .btn-toggle.active,
body.acbl-class-finder .btn-toggle.active:hover,
body.acbl-class-finder .btn-toggle.active:focus,
body.acbl-class-finder .btn-toggle.active:active {
  text-transform: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 7px 16px !important;
}

body.acbl-class-finder .btn-toggle.active {
  background-color: #1C2455 !important;
  border-color: #1C2455 !important;
  color: #fff !important;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 600px) {
  .acbl-class-finder .hero {
    padding: 24px 16px;
  }

  .acbl-class-finder .page-wrap {
    padding: 16px 12px 40px;
  }

  .acbl-class-finder .cards-grid {
    grid-template-columns: 1fr;
  }

  .acbl-class-finder .filters-grid {
    grid-template-columns: 1fr 1fr;
  }
}
