/* Athena Locator frontend styles. Scoped under .al-app to avoid collisions. */

.al-app { font-family: inherit; color: inherit; }
.al-app *, .al-app *::before, .al-app *::after { box-sizing: border-box; }

.al-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
}

.al-search {
    display: flex;
    gap: 8px;
    flex: 1 1 320px;
    align-items: center;
}

.al-search input.al-q {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 15px;
    min-width: 0;
}

.al-search input.al-q:focus {
    outline: 2px solid #f7931a;
    outline-offset: 2px;
    border-color: #f7931a;
}

.al-search button,
.al-standalone-search button {
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
}

.al-search button.al-geo {
    background: transparent;
    color: #111;
    border: 1px solid #d0d5dd;
    padding: 11px 12px;
    line-height: 0;
}

.al-search button:hover,
.al-standalone-search button:hover { opacity: 0.92; }

.al-search button.al-geo.al-loading svg { animation: al-spin 1s linear infinite; }
@keyframes al-spin { to { transform: rotate(360deg); } }

.al-filters {
    flex-basis: 100%;
    margin-top: 4px;
}

.al-filters summary {
    cursor: pointer;
    padding: 8px 0;
    font-weight: 600;
    user-select: none;
}

.al-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 12px 0;
}

.al-filter-group {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
}

.al-filter-group legend {
    font-weight: 600;
    padding: 0 6px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
}

.al-filter-group label {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    cursor: pointer;
}

.al-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 16px;
    height: var(--al-h, 600px);
}

.al-layout.al-sidebar-right { grid-template-columns: 1fr 380px; }
.al-layout.al-sidebar-right .al-results { order: 2; }
.al-layout.al-sidebar-right .al-map { order: 1; }

.al-results {
    overflow-y: auto;
    padding-right: 6px;
    border-right: 1px solid #f0f0f0;
}

.al-map {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f5;
    min-height: 320px;
}

.al-map-only .al-map { width: 100%; }

.al-result {
    position: relative;
    border: 1px solid #eaecef;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
    overflow: hidden;
}

.al-result--new { border-color: #f7931a; }

.al-new-ribbon {
    position: absolute;
    top: 10px;
    right: -28px;
    transform: rotate(45deg);
    background: #f7931a;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 3px 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 2;
}
.al-result--new header { padding-right: 56px; }

.al-promo {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--al-promo, #f7931a);
    background: linear-gradient(to right, color-mix(in srgb, var(--al-promo, #f7931a) 12%, white), #fff 80%);
    border-radius: 6px;
    font-size: 13px;
}

.al-promo-title { font-weight: 700; color: #111; }
.al-promo-code { margin-top: 2px; font-size: 12px; color: #444; }
.al-promo-expiry { margin-top: 2px; font-size: 11px; color: #777; }

/* Brand header ([athena_brand_logo]): logo stacked centered above the H1 */
.al-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center !important;
    gap: 10px;
    margin: 0 0 18px;
    text-align: center;
}
.al-brand-logo-row { display: flex; flex: 0 0 auto; margin: 0; }
.al-brand-logo-row img {
    /* Explicit width, not auto: SVGs exported with only a viewBox have no
       intrinsic size and collapse to 0x0 when both dimensions are auto. */
    width: var(--al-logo-w, 260px) !important;
    height: auto !important;
    max-width: var(--al-logo-w, 260px) !important;
    min-width: 0 !important;
    display: block;
}
h1.al-brand-heading {
    font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: 25pt !important;
    line-height: 1.2 !important;
    color: #111 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
@media (max-width: 640px) {
    h1.al-brand-heading { font-size: 20pt !important; }
    .al-brand-header { gap: 8px; }
}

/* Featured Promo Offer public banner */
.al-month-promo,
.al-month-promo * {
    text-align: left;
}
.al-month-promo {
    margin: 0 0 18px;
    padding: 22px 26px;
    border-radius: 14px;
    border-left: 5px solid var(--al-promo, #f7931a);
    background: linear-gradient(120deg, color-mix(in srgb, var(--al-promo, #f7931a) 16%, white), #fff 75%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.al-month-promo-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    color: var(--al-promo, #f7931a);
    margin-bottom: 4px;
}
.al-month-promo .al-month-promo-title {
    margin: 0 0 8px;
    font-size: clamp(20px, 2.4vw, 28px) !important;
    color: #111;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
}
.al-month-promo-desc { color: #444; font-size: 15px; line-height: 1.5; margin-bottom: 8px; }
.al-month-promo-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; color: #444; }
.al-month-promo-code strong { background: #fff; padding: 3px 10px; border-radius: 6px; border: 1px dashed #cbd5e1; font-family: ui-monospace, SFMono-Regular, monospace; letter-spacing: 0.08em; }
.al-month-promo-expiry { color: #777; font-size: 13px; }
.al-month-promo .al-btn { padding: 10px 18px; border-radius: 8px; background: var(--al-promo, #f7931a); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; }

/* Download the Athena App CTA */
.al-app-cta {
    margin: 28px 0 0;
    padding: 28px 32px;
    border-radius: 16px;
    background: linear-gradient(135deg, #111 0%, #1f2937 100%);
    color: #fff;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.al-app-cta-text { flex: 1 1 320px; text-align: left !important; }
.al-app-cta-text h2, .al-app-cta-text p { text-align: left !important; }
.al-app-cta h2 { margin: 0 0 4px; font-size: 22px !important; color: #f7931a !important; }
.al-app-cta p { margin: 0; color: #ffffff !important; font-size: 14px; line-height: 1.5; }
.al-app-cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.al-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #000;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.15s, background 0.15s;
}
.al-store-badge span,
.al-store-badge strong,
.al-store-badge small,
.al-store-badge svg { color: #fff !important; fill: currentColor; }
.al-store-badge-img { display: inline-block; flex: 0 0 auto; line-height: 0; transition: transform 0.15s; }
.al-store-badge-img:hover { transform: translateY(-1px); }
.al-app-cta .al-store-badge-img img,
.al-store-badge-img img {
    height: 52px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 52px !important;
    min-width: 0 !important;
    display: block;
    border: 0;
    margin: 0;
}
.al-store-badge:hover { transform: translateY(-1px); background: #1a1a1a; }
.al-store-badge svg { flex-shrink: 0; }
.al-store-badge span { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.al-store-badge small { font-size: 10px; opacity: 0.8; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.al-store-badge strong { font-size: 16px; font-weight: 700; }

@media (max-width: 600px) {
    .al-app-cta { padding: 22px; }
    .al-month-promo { padding: 18px 20px; }
}

/* What to Bring checklist */
.al-bring {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 28px 0 0;
    padding: 22px 24px;
    background: #fff8ed;
    border: 1px solid #fde2bf;
    border-radius: 14px;
}
.al-bring-heading {
    margin: 0 0 18px !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #111 !important;
    text-align: center !important;
    line-height: 1.2 !important;
}
.al-bring-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    justify-content: center;
    align-items: center;
}
.al-bring-list li {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #1c2434;
    flex: 0 0 auto;
    min-width: 0;
    margin: 0 !important;
}
.al-bring-check { flex-shrink: 0; }
.al-bring-icon { flex-shrink: 0; font-size: 20px; line-height: 1; }
.al-bring-tagline { text-align: center !important; margin: 14px 0 0 !important; color: #444 !important; font-size: 15px !important; }
@media (max-width: 640px) {
    .al-bring-list { flex-direction: column; gap: 12px; align-items: flex-start; }
    .al-bring-list li { flex: 0 0 auto; margin: 0 auto !important; }
}

/* Video embed */
.al-video {
    margin: 28px 0 0;
}
.al-video-heading {
    margin: 0 0 14px;
    font-size: 20px;
    color: #111;
    text-align: center;
}
.al-video-frame {
    position: relative;
    aspect-ratio: var(--al-video-aspect, 16 / 9);
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    background: #000;
}
.al-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


.al-result:hover {
    border-color: #f7931a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.al-result header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 4px;
}

/* Defensive layer: pin every element inside the results panel so theme
   heading, link, and alignment rules cannot restyle the cards. */
.al-results, .al-results * { text-align: left !important; }
.al-result h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    color: #111 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.al-distance {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    background: #f7f7f7;
    padding: 2px 8px;
    border-radius: 999px;
}

.al-addr, .al-phone, .al-hours {
    margin: 4px 0 !important;
    font-size: 14px !important;
    color: #444 !important;
    line-height: 1.4 !important;
}
.al-phone a, .al-result footer a, .al-iw a {
    color: #f7931a !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}
.al-phone a:hover, .al-result footer a:hover, .al-iw a:hover { text-decoration: underline !important; }
.al-result footer { font-size: 13px !important; }
.al-promo, .al-promo * { text-align: left !important; }
.al-promo-title { font-size: 13px !important; font-weight: 700 !important; color: #111 !important; }
.al-promo-code { font-size: 12px !important; color: #444 !important; }
.al-promo-expiry { font-size: 11px !important; color: #777 !important; }
.al-filters summary {
    text-align: left !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111 !important;
}

/* Meta bar: count pills + marker legend */
.al-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px !important;
    color: #555 !important;
    margin: 0 0 10px;
    text-align: left !important;
}
.al-pill {
    background: #f4f5f7;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px !important;
    color: #555 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.al-pill strong { color: #111 !important; }
.al-meta img.al-legend-icon,
.al-marker-legend img.al-legend-icon {
    width: 14px !important;
    height: 17px !important;
    max-width: 14px !important;
    min-width: 0 !important;
    display: inline-block;
    vertical-align: -3px;
    margin: 0 2px 0 4px;
}

.al-tags {
    margin-top: 8px;
}

.al-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.al-result footer {
    margin-top: 10px;
    font-size: 13px;
}

.al-link { color: #f7931a; text-decoration: none; font-weight: 600; }
.al-link:hover { text-decoration: underline; }

.al-empty, .al-loading-row, .al-error {
    padding: 32px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.al-iw strong { font-size: 14px; }
.al-iw a { color: #f7931a; text-decoration: none; font-weight: 600; }

.al-standalone-search {
    display: flex;
    gap: 8px;
    max-width: 480px;
}

.al-standalone-search input.al-q {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 15px;
}

@media (max-width: 768px) {
    .al-layout, .al-layout.al-sidebar-right {
        grid-template-columns: 1fr;
        height: auto;
    }
    .al-results {
        max-height: 420px !important;
        border-right: 0;
        border-bottom: 1px solid #f0f0f0;
        padding-right: 0;
        margin-bottom: 14px;
    }
    .al-map { height: 50vh !important; min-height: 320px; }
    .al-search { flex-wrap: wrap; }
    .al-search input.al-q { flex: 1 1 100%; order: 1; }
    .al-search button.al-geo { order: 2; }
    .al-search button.al-submit { order: 3; flex: 1; }
    .al-controls { gap: 10px; }
    .al-filter-grid { grid-template-columns: 1fr; }
    .al-app-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
    .al-app-cta-buttons { width: 100%; }
    .al-store-badge { flex: 1 1 auto; justify-content: center; }
    .al-month-promo { padding: 18px 20px; }
    .al-month-promo-meta { gap: 10px; }
}

@media (max-width: 420px) {
    .al-search button.al-submit { padding: 12px 14px; font-size: 14px; }
    .al-result { padding: 12px; }
    .al-new-ribbon { right: -38px; padding: 3px 40px; font-size: 9px; }
    .al-store-badge { padding: 8px 14px; }
    .al-store-badge strong { font-size: 14px; }
}

/* Located Inside line on result cards */
.al-inside {
    margin: 2px 0 4px !important;
    font-size: 13px !important;
    color: #555 !important;
    font-weight: 600;
}

/* Visitor radius picker */
.al-search select.al-radius {
    padding: 12px 10px !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #fff !important;
    color: #111 !important;
    flex: 0 0 auto;
    max-width: 130px;
}

/* Mobile app CTA: kill the giant empty gap. In column layout the text
   block must not keep its 320px flex-basis (which becomes HEIGHT), and
   theme section stretching must not inflate the card. */
.al-app-cta { min-height: 0 !important; height: auto !important; }
@media (max-width: 768px) {
    .al-app-cta { flex-direction: column; align-items: flex-start; padding: 22px; gap: 16px; }
    .al-app-cta-text { flex: 0 0 auto !important; min-height: 0 !important; }
    .al-app-cta-buttons { flex: 0 0 auto !important; width: 100%; }
    .al-search select.al-radius { order: 4; flex: 1 1 auto; max-width: none; }
}

/* "Locations to Serve You" state directory */
.al-directory {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 28px 0 0;
    padding: 28px 32px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
}
.al-directory-group { align-self: start; }
.al-directory-heading {
    margin: 0 0 22px !important;
    font-size: clamp(24px, 3vw, 34px) !important;
    font-weight: 800 !important;
    color: #111 !important;
    text-align: center !important;
    line-height: 1.2 !important;
}
.al-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 22px 28px;
}
.al-directory-letter {
    font-weight: 800;
    font-size: 16px;
    color: #111;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.al-directory-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.al-directory-list li { margin: 0 !important; padding: 0 !important; }
.al-directory-list a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 7px 2px !important;
    color: #111 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    border-radius: 6px;
}
.al-directory-list a:hover { color: #f7931a !important; }
.al-directory-name { flex: 1 1 auto; }
.al-directory-count {
    flex: 0 0 auto;
    background: #f1f3f5;
    color: #444 !important;
    border-radius: 999px;
    font-size: 12px !important;
    font-weight: 600;
    padding: 2px 9px;
    line-height: 1.5;
}
.al-directory-chevron { flex: 0 0 auto; color: #9aa0a6; }
@media (max-width: 640px) {
    .al-directory { padding: 20px; }
    .al-directory-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 18px; }
}

/* Brand logo on state/city archive heroes: hard cap. The SVG has no
   intrinsic size, so theme img { width:100% } rules blow it up to the
   full container width without these. */
.al-archive-hero img.al-brand-logo,
img.al-brand-logo {
    width: 180px !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 120px !important;
    min-width: 0 !important;
    display: inline-block;
    margin: 0 auto;
}

/* Balanced multi-line headings: break into even lines on phones and
   iPads instead of a long line plus an orphan word. */
h1.al-brand-heading,
.al-archive-hero h1,
.al-directory-heading {
    text-wrap: balance;
}
@media (min-width: 641px) and (max-width: 1024px) {
    h1.al-brand-heading { font-size: 22pt !important; }
}

/* App CTA on mobile: everything centered, badges side by side, smaller. */
@media (max-width: 768px) {
    .al-app-cta { align-items: center; }
    .al-app-cta-text,
    .al-app-cta-text h2,
    .al-app-cta-text p { text-align: center !important; }
    .al-app-cta-buttons { justify-content: center; flex-wrap: nowrap; gap: 10px; width: 100%; }
    .al-app-cta .al-store-badge-img img,
    .al-store-badge-img img { height: 44px !important; max-height: 44px !important; }
}
@media (max-width: 360px) {
    .al-app-cta .al-store-badge-img img,
    .al-store-badge-img img { height: 38px !important; max-height: 38px !important; }
}

/* State directory rows: name hard left, count + chevron hard right,
   letter headers left. Kills theme centering that floated the pills. */
.al-directory-letter { text-align: left !important; }
.al-directory-list a {
    width: 100% !important;
    justify-content: space-between;
}
.al-directory-name { flex: 1 1 auto; text-align: left !important; }
.al-directory-count { margin-left: auto; }
.al-directory-chevron { margin-left: 4px; }

/* App CTA subtitle on mobile: slightly larger and balanced so it breaks
   into tidy lines instead of orphaning "directions, and more!". */
@media (max-width: 768px) {
    .al-app-cta p {
        font-size: 15px !important;
        line-height: 1.55 !important;
        text-wrap: balance;
        max-width: 32ch;
        margin: 0 auto !important;
    }
}
