/**
 * Homepage & Search Styles (/, /search)
 * 
 * Info bar, filter bar, and page-specific styles.
 * Shared event listing styles (events-container, date-header, no-results) come from calendar.css.
 * Card styles from card.css, design system from design-system.css.
 */

/* === INFO BAR (homepage -- single pill, location/radius display) === */
.info-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
    text-align: center;
}

.info-bar-content {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.info-bar-content:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--neon-teal);
    transform: translateY(-1px);
}

.info-bar-icon {
    color: var(--neon-teal);
    font-size: 1rem;
}

.info-bar-text {
    color: var(--text-muted);
}

.info-bar-highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.info-bar-location {
    color: var(--neon-teal);
    font-weight: 600;
}

/* === FILTER BAR (search -- split pills) === */
.filter-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-pill__icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.filter-pill__label {
    color: var(--text-muted);
}

.filter-pill__value {
    color: var(--text-primary);
    font-weight: 600;
}

.filter-pill__location {
    color: var(--neon-teal);
    font-weight: 600;
}

/* Clear button (X) on pills */
.filter-pill__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-pill__clear:hover {
    background: rgba(255, 59, 154, 0.3);
    color: var(--neon-pink-bright);
    text-shadow: none;
}

/* Search pill */
.filter-pill--search {
    border-color: rgba(255, 59, 154, 0.25);
    background: rgba(255, 59, 154, 0.05);
}

.filter-pill--search .filter-pill__value {
    color: var(--neon-pink);
}

/* Category pill */
.filter-pill--category {
    border-color: rgba(74, 158, 255, 0.25);
    background: rgba(74, 158, 255, 0.05);
}

.filter-pill--category .filter-pill__label {
    color: var(--neon-blue);
    font-weight: 600;
}

/* Location pill (interactive) */
.filter-pill--location {
    cursor: pointer;
    border-color: rgba(0, 217, 255, 0.25);
    background: rgba(0, 217, 255, 0.05);
    font-family: inherit;
}

.filter-pill--location:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.4);
    transform: translateY(-1px);
}

/* Responsive: stack pills vertically on narrow screens */
@media (max-width: 640px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-pill {
        justify-content: center;
    }
}

/* === FILTER MODAL === */
.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.filter-modal.active {
    display: flex;
}

.filter-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.filter-modal__content {
    position: relative;
    width: 90%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.filter-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-modal__header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.filter-modal__close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.filter-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Context area (location + search term) */
.filter-modal__context {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 217, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.825rem;
}

.filter-modal__context-line {
    color: var(--text-secondary);
    line-height: 1.6;
}

.filter-modal__context-line strong {
    color: var(--text-primary);
}

.filter-modal__context-line--search strong {
    color: var(--neon-pink);
}

.filter-modal__context-action {
    color: var(--neon-teal);
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.filter-modal__context-action:hover {
    opacity: 1;
    text-decoration: underline;
    text-shadow: none;
}

.filter-modal__body {
    padding: 1.5rem;
}

.filter-modal__section {
    margin-bottom: 2rem;
}

.filter-modal__section:last-child {
    margin-bottom: 0;
}

.filter-modal__section h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.filter-modal__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-modal__option {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-modal__option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    text-shadow: none;
    transform: translateY(-1px);
}

/* Disabled state (0 results) */
.filter-modal__option--disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.filter-modal__option--disabled .filter-modal__option-count {
    color: var(--text-muted);
}

.filter-modal__option--active {
    background: rgba(255, 59, 154, 0.15);
    border-color: rgba(255, 59, 154, 0.4);
    color: var(--neon-pink);
    font-weight: 600;
}

.filter-modal__option--active:hover {
    background: rgba(255, 59, 154, 0.25);
    border-color: rgba(255, 59, 154, 0.5);
    color: var(--neon-pink-bright);
}

/* Participation mode options -- wider with description */
.filter-modal__option--mode {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
    padding: 0.75rem 1rem;
}

.filter-modal__option--mode.filter-modal__option--active {
    background: rgba(0, 217, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.4);
    color: var(--neon-teal);
}

.filter-modal__option--mode.filter-modal__option--active:hover {
    background: rgba(0, 217, 255, 0.25);
    border-color: rgba(0, 217, 255, 0.5);
    color: var(--neon-teal-bright);
}

/* Facet count badge */
.filter-modal__option-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.filter-modal__option--active .filter-modal__option-count {
    color: inherit;
    opacity: 0.7;
}

/* Option name (inline with count) */
.filter-modal__option-name {
    font-weight: inherit;
}

.filter-modal__option-desc {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
}

.filter-modal__option--active .filter-modal__option-desc {
    color: inherit;
    opacity: 0.7;
}

/* Footer: sticky row with Clear + Apply */
.filter-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    position: sticky;
    bottom: 0;
}

.filter-modal__clear-all {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.5rem 0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.filter-modal__clear-all:hover {
    color: var(--neon-pink);
    text-shadow: none;
}

/* Apply button */
.filter-modal__apply {
    background: var(--neon-teal);
    color: #000;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-modal__apply:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

@media (max-width: 640px) {
    .filter-modal__option--mode {
        flex: 1 1 100%;
    }
}
