/*
Theme Name: Airlines Behaving Badly
Theme URI: https://airlinesbehavingbadly.com
Author: Airlines Behaving Badly
Description: Independent airline accountability and ranking site.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.0
License: Proprietary
Text Domain: abb
*/

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --abb-navy:    #0f0f1a;
  --abb-card:    #1a1a2e;
  --abb-surface: #161625;
  --abb-red:     #e24b4a;
  --abb-green:   #639922;
  --abb-amber:   #ef9f27;
  --abb-text:    rgba(255,255,255,0.85);
  --abb-muted:   rgba(255,255,255,0.38);
  --abb-bg:      #111120;
  --abb-border:  rgba(255,255,255,0.07);
  --abb-radius:  12px;
  --abb-radius-sm: 8px;
  --abb-font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --abb-max:     1200px;
}

html { font-size: 16px; }
body { font-family: var(--abb-font); background: var(--abb-bg); color: var(--abb-text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.abb-wrap { max-width: var(--abb-max); margin: 0 auto; padding: 0 1.5rem; }
.abb-layout { display: grid; grid-template-columns: 1fr 200px; gap: 2rem; align-items: flex-start; }
.abb-main   { min-width: 0; }
.abb-sidebar { position: sticky; top: 80px; }
@media (max-width: 900px) { .abb-layout { grid-template-columns: 1fr; } .abb-sidebar { position: static; } }

/* ── Site Header ── */
.abb-header { background: var(--abb-navy); border-bottom: 0.5px solid var(--abb-border); position: sticky; top: 0; z-index: 100; }
.abb-header__inner { max-width: var(--abb-max); margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.abb-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.abb-logo__icon { width: 32px; height: 32px; background: var(--abb-red); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.abb-logo__name { font-size: 15px; font-weight: 500; color: #fff; letter-spacing: -0.2px; white-space: nowrap; }
.abb-logo__name-dim { color: rgba(255,255,255,0.32); }
.abb-nav { display: flex; align-items: center; gap: 4px; }
.abb-nav a { color: rgba(255,255,255,0.45); font-size: 12px; padding: 5px 12px; border-radius: 6px; transition: background 0.12s, color 0.12s; }
.abb-nav a:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); text-decoration: none; }
.abb-nav a.current-menu-item, .abb-nav a.current { color: #fff; background: rgba(255,255,255,0.09); text-decoration: none; }
.abb-nav-toggle { display: none; background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.7); line-height: 1; padding: 4px; }
@media (max-width: 680px) {
  .abb-nav { display: none; }
  .abb-nav-toggle { display: flex; align-items: center; }
  .abb-nav.open { display: flex; flex-direction: column; position: fixed; top: 56px; left: 0; right: 0; background: var(--abb-navy); padding: 1rem 1.5rem; gap: 4px; border-top: 0.5px solid var(--abb-border); z-index: 99; }
  .abb-nav.open a { padding: 10px 14px; border-radius: 8px; }
}

/* ── Hero Banner ── */
.abb-hero { background: var(--abb-navy); padding: 2.5rem 0; position: relative; overflow: hidden; border-bottom: 0.5px solid var(--abb-border); }
.abb-hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 40px); pointer-events: none; }
.abb-hero__eyebrow { font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.abb-hero__title { font-size: clamp(22px,4vw,38px); font-weight: 500; color: #fff; line-height: 1.2; margin-bottom: 10px; }
.abb-hero__sub { font-size: 14px; color: rgba(255,255,255,0.38); max-width: 540px; margin-bottom: 1.5rem; }
.abb-hero__stats { display: flex; gap: 10px; flex-wrap: wrap; }
.abb-hero__stat { background: rgba(255,255,255,0.05); border: 0.5px solid rgba(255,255,255,0.09); border-radius: var(--abb-radius-sm); padding: 8px 14px; }
.abb-hero__stat-num { font-size: 18px; font-weight: 500; color: #fff; }
.abb-hero__stat-lbl { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 1px; }

/* ── Ad Slots ── */
.abb-ad { background: rgba(255,255,255,0.04); border: 0.5px dashed rgba(255,255,255,0.1); border-radius: var(--abb-radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(255,255,255,0.2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.abb-ad--leaderboard { width: 100%; height: 90px; margin-bottom: 1.25rem; }
.abb-ad--banner      { width: 100%; height: 60px; margin-top: 1.5rem; }
.abb-ad--inline      { width: 100%; height: 90px; margin: 1.25rem 0; }
.abb-ad--inline-sm   { width: 100%; height: 60px; margin: 1rem 0; }
.abb-ad--sidebar-lg  { width: 100%; height: 250px; margin-bottom: 1rem; }
.abb-ad--sidebar-sm  { width: 100%; height: 160px; }

/* ── Filters ── */
.abb-filters { background: var(--abb-surface); border: 0.5px solid var(--abb-border); border-radius: var(--abb-radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.abb-filters__title { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.abb-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.abb-pill { font-size: 11px; padding: 4px 12px; border-radius: 20px; border: 0.5px solid rgba(255,255,255,0.1); background: transparent; color: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.12s; font-family: var(--abb-font); }
.abb-pill:hover { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.75); }
.abb-pill.active { background: var(--abb-red); color: #fff; border-color: var(--abb-red); }
.abb-pill.active-city { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.2); }

/* ── Sort Bar ── */
.abb-sort { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 1.25rem; }
.abb-sort__lbl { font-size: 12px; color: rgba(255,255,255,0.3); margin-right: 4px; }

/* ── Grid header ── */
.abb-grid-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.abb-grid-head__title { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); }
.abb-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,0.3); }
.abb-legend__grad { width: 80px; height: 5px; border-radius: 3px; background: linear-gradient(to right, #e24b4a, #ef9f27, #639922); }

/* ── Airline Grid ── */
.abb-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
@media (max-width: 700px) { .abb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .abb-grid { grid-template-columns: 1fr; } }

.abb-card { border-radius: var(--abb-radius); border: 0.5px solid transparent; padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: transform 0.12s, border-color 0.12s; position: relative; text-decoration: none !important; }
.abb-card:hover { transform: translateY(-2px); text-decoration: none; }
.abb-card__rank { position: absolute; top: 8px; left: 10px; font-size: 10px; font-weight: 500; }
.abb-badge { width: 72px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; color: #fff; letter-spacing: 0.5px; }
.abb-card__name { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.8); text-align: center; line-height: 1.3; }
.abb-card__route { font-size: 9px; color: rgba(255,255,255,0.3); text-align: center; }
.abb-track { width: 100%; height: 4px; border-radius: 2px; overflow: hidden; }
.abb-track__fill { height: 100%; border-radius: 2px; }
.abb-card__foot { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.abb-card__score { font-size: 10px; }
.abb-grade { font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 20px; color: #fff; }
.abb-no-results { grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--abb-muted); }

/* ── Detail Page ── */
.abb-breadcrumb { font-size: 13px; color: rgba(255,255,255,0.3); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 6px; }
.abb-breadcrumb a { color: rgba(255,255,255,0.3); }
.abb-breadcrumb a:hover { color: rgba(255,255,255,0.7); text-decoration: none; }

.abb-detail-hero { background: var(--abb-surface); border: 0.5px solid var(--abb-border); border-radius: var(--abb-radius); padding: 1rem 1.75rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.abb-detail-badge { width: 90px; height: 56px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 500; color: #fff; flex-shrink: 0; letter-spacing: 1px; }
.abb-detail-hero__info { flex: 1; min-width: 160px; }
.abb-detail-hero__name { font-size: 24px; font-weight: 500; color: #fff; margin-bottom: 4px; }
.abb-detail-hero__sub  { font-size: 13px; color: rgba(255,255,255,0.4); }
.abb-detail-hero__routes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.abb-detail-hero__route { font-size: 11px; padding: 3px 10px; background: rgba(255,255,255,0.07); border-radius: 20px; color: rgba(255,255,255,0.55); }
.abb-detail-hero__score { text-align: right; }
.abb-detail-score { font-size: 44px; font-weight: 500; line-height: 1; }
.abb-detail-grade-lbl { font-size: 12px; color: rgba(255,255,255,0.3); margin-top: 3px; }

.abb-score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .abb-score-grid { grid-template-columns: 1fr; } }

.abb-panel { background: var(--abb-surface); border: 0.5px solid var(--abb-border); border-radius: var(--abb-radius); padding: 1.25rem; }
.abb-panel__title { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; display: flex; align-items: center; gap: 6px; }

.abb-metric { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.abb-metric:last-child { margin-bottom: 0; }
.abb-metric__icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.abb-metric__body { flex: 1; }
.abb-metric__head  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.abb-metric__label { font-size: 12px; color: rgba(255,255,255,0.4); }
.abb-metric__wt    { font-size: 10px; color: rgba(255,255,255,0.25); }
.abb-metric__val   { font-size: 15px; font-weight: 500; }
.abb-metric__bar   { height: 4px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; }
.abb-metric__bar-fill { height: 100%; border-radius: 2px; }
.abb-metric__desc  { font-size: 10px; color: rgba(255,255,255,0.25); margin-top: 3px; }

.abb-glance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.abb-glance__cell { background: rgba(255,255,255,0.04); border-radius: 8px; padding: 12px; text-align: center; }
.abb-glance__val  { font-size: 22px; font-weight: 500; }
.abb-glance__lbl  { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 3px; }

/* ── Glance links ── */
.abb-glance-link { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 12px; background:rgba(255,255,255,0.06); border:0.5px solid rgba(255,255,255,0.08); border-radius:8px; text-decoration:none; color:rgba(255,255,255,0.7); transition:background 0.12s; }
.abb-glance-link:hover { background:rgba(255,255,255,0.10); text-decoration:none; color:#fff; }
.abb-glance-link__text { display:flex; flex-direction:column; gap:1px; min-width:0; }
.abb-glance-link__label { font-size:12px; font-weight:500; color:inherit; line-height:1.3; }
.abb-glance-link__sub { font-size:10px; color:rgba(255,255,255,0.3); line-height:1.3; }
.abb-glance-link__arrow { font-size:12px; color:rgba(255,255,255,0.25); flex-shrink:0; }

/* ── News ── */
.abb-news { background: var(--abb-surface); border: 0.5px solid var(--abb-border); border-radius: var(--abb-radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.abb-news__title { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; display: flex; align-items: center; gap: 6px; }
.abb-news-item { padding: 10px 0; border-bottom: 0.5px solid rgba(255,255,255,0.06); display: flex; gap: 12px; border-radius: 6px; transition: background 0.12s; }
.abb-news-item:last-child { border-bottom: none; padding-bottom: 0; }
a.abb-news-item:hover { background: rgba(255,255,255,0.04); text-decoration: none; }
a.abb-news-item:hover .abb-news-item__hed { text-decoration: underline; }
.abb-news-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.abb-news-item__hed  { font-size: 13px; font-weight: 500; line-height: 1.4; margin-bottom: 4px; color: rgba(255,255,255,0.8); }
.abb-news-item__meta { font-size: 11px; color: rgba(255,255,255,0.3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.abb-news-tag { font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 500; }

/* ── Comments ── */
.abb-comments { background: var(--abb-surface); border: 0.5px solid var(--abb-border); border-radius: var(--abb-radius); padding: 1.25rem; }
.abb-comments__title { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; display: flex; align-items: center; gap: 6px; }
.abb-comment-form { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 0.5px solid var(--abb-border); }
.abb-comment-form__row { display: flex; gap: 8px; margin-bottom: 8px; }
.abb-input    { flex: 1; font-size: 13px; padding: 8px 12px; border: 0.5px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.05); color: #fff; font-family: var(--abb-font); }
.abb-select   { font-size: 13px; padding: 8px 10px; border: 0.5px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.05); color: #fff; font-family: var(--abb-font); }
.abb-textarea { width: 100%; font-size: 13px; padding: 10px 12px; border: 0.5px solid rgba(255,255,255,0.1); border-radius: 8px; background: rgba(255,255,255,0.05); color: #fff; font-family: var(--abb-font); resize: vertical; min-height: 80px; display: block; margin-bottom: 8px; }
.abb-input::placeholder, .abb-textarea::placeholder { color: rgba(255,255,255,0.25); }
.abb-input:focus, .abb-select:focus, .abb-textarea:focus { outline: none; border-color: rgba(255,255,255,0.3); }
.abb-btn { font-size: 13px; padding: 8px 18px; border-radius: 8px; border: none; background: var(--abb-red); color: #fff; cursor: pointer; font-family: var(--abb-font); transition: opacity 0.15s; }
.abb-btn:hover { opacity: 0.85; }
.abb-btn--full { width: 100%; margin-top: 4px; }
.abb-comment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 0.5px solid var(--abb-border); }
.abb-comment:last-child { border-bottom: none; padding-bottom: 0; }
.abb-comment__avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: #fff; flex-shrink: 0; }
.abb-comment__body   { flex: 1; }
.abb-comment__head   { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.abb-comment__name   { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.8); }
.abb-comment__rating { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 500; }
.abb-comment__date   { font-size: 11px; color: rgba(255,255,255,0.25); }
.abb-comment__text   { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.55; }

/* ── Footer ── */
.abb-footer { background: var(--abb-navy); border-top: 0.5px solid var(--abb-border); color: rgba(255,255,255,0.4); padding: 2.5rem 0; margin-top: 3rem; }
.abb-footer__inner { max-width: var(--abb-max); margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.abb-footer__brand { font-size: 16px; font-weight: 500; color: #fff; margin-bottom: 4px; }
.abb-footer__sub   { font-size: 12px; }
.abb-footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.abb-footer__links a { font-size: 12px; color: rgba(255,255,255,0.4); }
.abb-footer__links a:hover { color: #fff; text-decoration: none; }
.abb-footer__legal { font-size: 11px; }

/* ── Sidebar widgets ── */
.abb-widget { background: var(--abb-surface); border: 0.5px solid var(--abb-border); border-radius: var(--abb-radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.abb-widget__title { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.75rem; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.abb-award-seal {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}
.abb-award-seal img {
  width: 100px;
  height: 100px;
}