/**
 * Service Areas — Frontend Stylesheet
 *
 * Styles all shortcode output: location tables, prev/next nav,
 * and coverage map containers. Uses BEM naming with sa- prefix.
 * Tailwind-compatible — no resets, no global overrides.
 *
 * @package ServiceAreas
 * @author  DublinBlue - Developed by Justin Shinn
 * @copyright 2026 DublinBlue
 */

/* ==========================================================================
   Location List Table (.sa-location-table)
   ========================================================================== */

.sa-location-list {
    margin: 1.5em 0;
}

.sa-location-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sa-location-table__head {
    border-bottom: 2px solid #e5e7eb;
}

.sa-location-table__heading {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.sa-location-table__row {
    transition: background-color 0.15s ease;
}

/* Zebra-striping */
.sa-location-table__row--even {
    background-color: #f9fafb;
}

.sa-location-table__row--odd {
    background-color: #ffffff;
}

/* Row hover */
.sa-location-table__row:hover {
    background-color: #f3f4f6;
}

.sa-location-table__cell {
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Empty padding cells in multi-column tables */
.sa-location-table__cell--empty {
    border-bottom-color: transparent;
    background: transparent !important;
}

.sa-location-table__link {
    display: block;
    padding: 0.625rem 1rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.sa-location-table__link:hover,
.sa-location-table__link:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

.sa-location-table__link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Location List — Horizontal View (.sa-location-list--horizontal)
   ========================================================================== */

.sa-location-list--horizontal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem;
    line-height: 1.6;
}

/* Inline links (default horizontal display) */
.sa-location-list__link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.sa-location-list__link:hover,
.sa-location-list__link:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

.sa-location-list__link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

.sa-location-list__sep {
    color: #9ca3af;
    user-select: none;
}

/* Button display (pill-style) */
.sa-location-list--buttons {
    gap: 0.5rem;
}

.sa-location-list__btn {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 9999px;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.sa-location-list__btn:hover,
.sa-location-list__btn:focus {
    background-color: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
}

.sa-location-list__btn:active {
    transform: scale(0.97);
}

.sa-location-list__btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ==========================================================================
   Prev/Next Navigation (.sa-prevnext)
   ========================================================================== */

.sa-prevnext {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 3px 0;
    padding: 3px 0;
}

.sa-prevnext__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    transition: opacity 0.15s ease;
}

.sa-prevnext__link:hover,
.sa-prevnext__link:focus {
    color: #ffffff !important;
    opacity: 0.8;
    text-decoration: none;
}

.sa-prevnext__link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Push "next" link to the right when prev is absent */
.sa-prevnext__link--next:first-child {
    margin-left: auto;
}

.sa-prevnext__arrow {
    font-size: 1.125rem;
    line-height: 1;
}

.sa-prevnext__label {
    line-height: 1.4;
}

/* Parent page link in prev/next */
.sa-prevnext__link--parent {
    color: #ffffff !important;
    font-size: 0.875rem;
    opacity: 0.9;
}

.sa-prevnext__link--parent:hover,
.sa-prevnext__link--parent:focus {
    color: #ffffff !important;
    opacity: 0.7;
}

.sa-prevnext__icon {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
    line-height: 1;
}

/* Standalone parent link shortcode */
.sa-parent-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.sa-parent-link:hover,
.sa-parent-link:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ==========================================================================
   Coverage Map (.sa-coverage-map)
   ========================================================================== */

.sa-coverage-map {
    position: relative;
    margin: 1.5em auto;
    background-color: #f3f4f6;
    border-radius: 6px;
    overflow: hidden;
}

.sa-coverage-map iframe {
    display: block;
    border: 0;
    width: 100%;
    border-radius: 6px;
}

/* ==========================================================================
   Responsive — Mobile (<768px)
   ========================================================================== */

@media (max-width: 767px) {

    /* Table: collapse to single column on mobile */
    .sa-location-table,
    .sa-location-table__head,
    .sa-location-table__body,
    .sa-location-table__row,
    .sa-location-table__cell {
        display: block;
    }

    .sa-location-table__head {
        display: none;
    }

    .sa-location-table__cell {
        padding: 0.5rem 0.75rem;
    }

    /* Hide empty padding cells on mobile */
    .sa-location-table__cell--empty {
        display: none;
    }

    /* Horizontal buttons: full-width on mobile */
    .sa-location-list--buttons .sa-location-list__btn {
        text-align: center;
        flex: 1 1 100%;
    }

    /* Prev/Next: stack vertically */
    .sa-prevnext {
        flex-direction: column;
        gap: 0.5rem;
    }

    .sa-prevnext__link {
        width: 100%;
        justify-content: center;
    }

    .sa-prevnext__link--next:first-child {
        margin-left: 0;
    }
}

/* ==========================================================================
   FAQ Accordion (.sa-faq)
   ========================================================================== */

.sa-faq {
    margin: 1.5em 0;
}

/* Text takes the color of the section the FAQ sits in. A fixed color for every FAQ is the
   FAQ Text Color setting, added after this file (AssetManager::faq_color_css). */
.sa-faq,
.sa-faq .sa-faq__item,
.sa-faq .sa-faq__question,
.sa-faq .sa-faq__answer,
.sa-faq details,
.sa-faq summary {
    color: inherit;
}

.sa-faq__item {
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
    border-bottom-color: color-mix(in srgb, currentColor 15%, transparent);
}

.sa-faq__item:last-child {
    border-bottom: none;
}

.sa-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    color: inherit !important;
    background: transparent;
    transition: opacity 0.15s ease;
}

.sa-faq__question:hover {
    opacity: 0.85;
}

.sa-faq__question::-webkit-details-marker {
    display: none;
}

.sa-faq__question::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid currentColor;
    border-radius: 4px;
    margin-left: 1rem;
    line-height: 1;
}

.sa-faq__item[open] > .sa-faq__question::after {
    content: "\2212";
}

.sa-faq__answer {
    padding: 0 0 1rem;
    color: inherit !important;
    opacity: 0.9;
    line-height: 1.65;
}

/* ==========================================================================
   Why Choose Cards (.why-choose-grid)
   ========================================================================== */

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.why-choose-card {
    background: #7abd56;
    border-left: 3px solid var(--primary_color, #65a30d);
    border-radius: 4px;
    padding: 20px 24px;
    color: #0b2621;
}

.why-choose-card h3 {
    font-family: "Mulish", sans-serif;
    font-weight: 700;
    font-size: 20px !important;
    line-height: 1.3;
    margin: 0 0 8px;
    color: #0b2621 !important;
}

.why-choose-card p {
    font-family: "Mulish", sans-serif;
    font-size: 17px;
    margin: 0;
    line-height: 1.5;
    color: #0b2621 !important;
}

.why-choose-card .nums {
    font-family: "Mulish", sans-serif;
    font-size: 20px;
    margin-right: 25px;
    line-height: 1.3;
    color: #0b2621 !important;
}

@media (max-width: 768px) {
    .why-choose-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   City Intro (.sa-city-intro)
   ========================================================================== */

.sa-city-intro {
    margin: 1.25em 0;
    line-height: 1.7;
}

.sa-city-intro p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   City Neighborhoods (.sa-city-neighborhoods)
   ========================================================================== */

.sa-city-neighborhoods {
    margin: 1.5em 0;
}

.sa-city-neighborhoods__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5em;
}

.sa-city-neighborhoods__list {
    list-style: disc;
    padding-left: 1.25em;
    margin: 0 0 0.5em;
    line-height: 1.6;
}

.sa-city-neighborhoods__list li {
    padding: 0.125em 0;
    break-inside: avoid;
}

.sa-city-neighborhoods__suffix {
    font-style: italic;
    opacity: 0.85;
    margin: 0;
}
