/* ============================================
   7 BREW LOCATIONS — Premium SaaS White Theme
   All selectors prefixed with .sbrew- to avoid WP conflicts
   ============================================ */

.sbrew-locations-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #101828;
    line-height: 1.6;
    /* Reset common WP theme interference */
    box-sizing: border-box;
}

.sbrew-locations-wrapper *,
.sbrew-locations-wrapper *::before,
.sbrew-locations-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.sbrew-hero {
    background: #ffffff;
    border-bottom: 1px solid #e8ecf1;
    padding: 60px 24px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.sbrew-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a1a2e 0%, #667eea 50%, #1a1a2e 100%);
    background-size: 200% 100%;
    animation: sbrewShimmer 3s ease-in-out infinite;
}

@keyframes sbrewShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.sbrew-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: #f0f1f5;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: #475467;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: sbrewFadeInDown 0.6s ease-out;
}

.sbrew-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: sbrewPulseDot 2s ease-in-out infinite;
}

@keyframes sbrewPulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

@keyframes sbrewFadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.sbrew-hero-title {
    font-size: clamp(28px, 5vw, 48px) !important;
    font-weight: 800 !important;
    color: #101828 !important;
    line-height: 1.15 !important;
    margin-bottom: 14px !important;
    letter-spacing: -1.5px;
    animation: sbrewFadeInDown 0.6s ease-out 0.1s backwards;
    padding: 0 !important;
    border: none !important;
}

.sbrew-hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: #475467;
    max-width: 560px;
    margin: 0 auto 28px !important;
    font-weight: 400;
    animation: sbrewFadeInDown 0.6s ease-out 0.2s backwards;
}

/* ============================================
   SEARCH BAR
   ============================================ */
.sbrew-search-container {
    max-width: 580px;
    margin: 0 auto;
    position: relative;
    animation: sbrewFadeInDown 0.6s ease-out 0.3s backwards;
}

.sbrew-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.sbrew-search-icon {
    position: absolute;
    left: 18px;
    width: 20px;
    height: 20px;
    color: #98a2b3;
    pointer-events: none;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbrew-search-input {
    width: 100%;
    padding: 16px 50px 16px 50px !important;
    font-size: 15px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 400;
    border: 2px solid #e8ecf1 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    color: #101828 !important;
    outline: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: auto !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.sbrew-search-input::placeholder {
    color: #98a2b3;
}

.sbrew-search-input:focus {
    border-color: #1a1a2e !important;
    box-shadow: 0 0 0 4px rgba(26, 26, 46, 0.08) !important;
}

.sbrew-search-clear {
    position: absolute;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none !important;
    background: #f2f4f7 !important;
    color: #475467;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.sbrew-search-clear:hover {
    background: #e8ecf1 !important;
}

.sbrew-search-clear.sbrew-visible {
    display: flex;
}

/* ============================================
   STATS BAR
   ============================================ */
.sbrew-stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 28px 24px;
    max-width: 1200px;
    margin: 0 auto;
    animation: sbrewFadeIn 0.6s ease-out 0.4s backwards;
}

@keyframes sbrewFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sbrew-stat-item {
    text-align: center;
}

.sbrew-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #101828;
    letter-spacing: -1px;
    line-height: 1.2;
}

.sbrew-stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #98a2b3;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.sbrew-main-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.sbrew-results-info {
    padding: 16px 0;
    font-size: 13px;
    color: #98a2b3;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sbrew-results-info span {
    font-weight: 700;
    color: #101828;
}

/* ============================================
   TOOLBAR
   ============================================ */
.sbrew-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.sbrew-toolbar-actions {
    display: flex;
    gap: 8px;
}

.sbrew-btn-tool {
    padding: 7px 14px !important;
    border: 1px solid #e8ecf1 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #475467 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5 !important;
    min-height: 0 !important;
    min-width: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.sbrew-btn-tool:hover {
    border-color: #1a1a2e !important;
    color: #1a1a2e !important;
    background: #f0f1f5 !important;
}

/* ============================================
   STATE ACCORDION
   ============================================ */
.sbrew-state-accordion {
    background: #ffffff;
    border: 1px solid #e8ecf1;
    border-radius: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    animation: sbrewFadeInUp 0.4s ease-out backwards;
}

@keyframes sbrewFadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.sbrew-state-accordion:hover {
    border-color: #d0d5dd;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.sbrew-state-accordion.sbrew-active {
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.06);
    border-color: #d0d5dd;
}

.sbrew-state-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    user-select: none;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: none;
    width: 100%;
}

.sbrew-state-header:hover {
    background: #f0f1f5;
}

.sbrew-state-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sbrew-state-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f0f1f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbrew-state-accordion.sbrew-active .sbrew-state-icon {
    background: #1a1a2e;
    color: #ffffff;
}

.sbrew-state-name {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    letter-spacing: -0.3px;
}

.sbrew-state-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sbrew-city-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #f2f4f7;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: #344054;
    white-space: nowrap;
}

.sbrew-chevron {
    width: 20px;
    height: 20px;
    color: #98a2b3;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sbrew-state-accordion.sbrew-active .sbrew-chevron {
    transform: rotate(180deg);
}

/* ============================================
   CITY GRID
   ============================================ */
.sbrew-state-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbrew-state-body-inner {
    padding: 4px 24px 24px;
}

.sbrew-city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.sbrew-city-card {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 14px 16px !important;
    background: #f8f9fb !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: none !important;
}

.sbrew-city-card:hover {
    background: #ffffff !important;
    border-color: #e8ecf1 !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
    transform: translateY(-1px);
    text-decoration: none !important;
    color: inherit !important;
}

.sbrew-city-card:visited,
.sbrew-city-card:active,
.sbrew-city-card:focus {
    color: inherit !important;
    text-decoration: none !important;
}

.sbrew-city-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a1a2e;
    opacity: 0.3;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbrew-city-card:hover .sbrew-city-dot {
    opacity: 1;
    transform: scale(1.3);
}

.sbrew-city-info {
    flex: 1;
    min-width: 0;
}

.sbrew-city-name {
    font-size: 14px;
    font-weight: 500;
    color: #101828;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbrew-city-stands {
    font-size: 12px;
    color: #98a2b3;
    font-weight: 400;
}

.sbrew-city-arrow {
    width: 16px;
    height: 16px;
    color: #98a2b3;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sbrew-city-card:hover .sbrew-city-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   NO RESULTS
   ============================================ */
.sbrew-no-results {
    text-align: center;
    padding: 80px 24px;
    display: none;
}

.sbrew-no-results.sbrew-visible {
    display: block;
}

.sbrew-no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: #f0f1f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbrew-no-results h3 {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin-bottom: 8px;
}

.sbrew-no-results p {
    font-size: 14px;
    color: #475467;
}

/* ============================================
   FOOTER
   ============================================ */
.sbrew-footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid #e8ecf1;
    background: #ffffff;
    border-radius: 0 0 16px 16px;
}

.sbrew-footer p {
    font-size: 13px;
    color: #98a2b3;
    font-weight: 400;
}

.sbrew-footer a {
    color: #475467;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbrew-footer a:hover {
    color: #1a1a2e;
}

/* Highlight matching text */
.sbrew-locations-wrapper mark {
    background: rgba(26, 26, 46, 0.1);
    color: #101828;
    padding: 1px 2px;
    border-radius: 3px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sbrew-hero {
        padding: 48px 20px 36px;
    }

    .sbrew-stats-bar {
        gap: 24px;
    }

    .sbrew-stat-number {
        font-size: 24px;
    }

    .sbrew-state-header {
        padding: 14px 16px;
    }

    .sbrew-state-header-left {
        gap: 12px;
    }

    .sbrew-state-icon {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .sbrew-state-name {
        font-size: 14px;
    }

    .sbrew-city-grid {
        grid-template-columns: 1fr;
    }

    .sbrew-state-body-inner {
        padding: 4px 16px 16px;
    }

    .sbrew-city-count-badge {
        font-size: 11px;
        padding: 3px 10px;
    }

    .sbrew-main-container {
        padding: 0 16px 60px;
    }
}

@media (max-width: 480px) {
    .sbrew-stats-bar {
        gap: 16px;
    }

    .sbrew-stat-number {
        font-size: 20px;
    }

    .sbrew-stat-label {
        font-size: 10px;
    }
}
