/**
 * Business Section Styles
 */

:root {
    --business-primary: #1a73e8;
    --business-secondary: #0d47a1;
    --business-accent: #fbbc04;
    --business-surface: #ffffff;
}

.business-theme {
    --primary-color: var(--business-primary);
}

.business-view {
    color: var(--text-primary);
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 40px 60px;
    display: flex;
    flex-direction: column;
}

/* Business Category Header */
.category-header.business-theme {
    margin-bottom: 24px;
}

.business-header-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.business-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.65);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.business-header-link:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.20);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.80);
}

.business-brela-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(26, 115, 232, 0.25);
    background: rgba(26, 115, 232, 0.08);
    color: rgba(8, 53, 130, 1);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.business-brela-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(26, 115, 232, 0.40);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    background: rgba(26, 115, 232, 0.12);
}

.business-brela-btn:focus-visible,
.business-header-link:focus-visible {
    outline: 3px solid rgba(224, 163, 0, 0.35);
    outline-offset: 2px;
}

/* ========================================
   BRELA Modal
   ======================================== */

.brela-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.brela-modal-overlay.active {
    display: flex;
}

.brela-modal {
    width: min(760px, calc(100vw - 36px));
    max-height: min(82vh, 720px);
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.brela-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

.brela-modal-title {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.1px;
    color: var(--text-primary);
}

.brela-modal-close {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 12px;
    cursor: pointer;
}

.brela-form {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.brela-form-row {
    display: grid;
    gap: 6px;
}

.brela-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.brela-input,
.brela-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.brela-input:focus,
.brela-select:focus {
    border-color: rgba(224, 163, 0, 0.55);
    box-shadow: 0 0 0 4px rgba(224, 163, 0, 0.14);
    background: rgba(255, 255, 255, 0.95);
}

.brela-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.brela-submit-btn {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(26, 115, 232, 0.35);
    background: rgba(26, 115, 232, 0.95);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.brela-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.brela-external-link {
    font-size: 13px;
    font-weight: 800;
    color: rgba(8, 53, 130, 1);
    text-decoration: none;
}

.brela-external-link:hover {
    text-decoration: underline;
}

.brela-results {
    padding: 0 14px 14px;
    overflow: auto;
    display: grid;
    gap: 10px;
}

.brela-result-card {
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px 12px;
    display: grid;
    gap: 6px;
}

.brela-result-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.1px;
}

.brela-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.brela-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.brela-empty {
    padding: 10px 2px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
}

.brela-error {
    padding: 10px 2px;
    color: #b91c1c;
    font-weight: 700;
    font-size: 13px;
}

.category-header.business-theme h2 {
    font-family: var(--font-brand);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 0 8px 0;
    line-height: 1.15;
}

.category-header.business-theme .category-description {
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
}

.location-badge {
    background: #e8f0fe;
    color: #1967d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* What's Happening Section */
.whats-happening-section {
    margin-bottom: 40px;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.whats-happening-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.header-left h3 {
    margin: 0;
    font-size: clamp(14px, 1.9vw, 18px);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    white-space: nowrap;
}

.update-time {
    font-size: 0.85rem;
    color: #34a853;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.update-time::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #34a853;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 168, 83, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 168, 83, 0); }
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    margin-bottom: 40px;
}

.whats-happening-carousel {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding: 10px 4px;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    -webkit-overflow-scrolling: touch;
}

.whats-happening-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.happening-card {
    flex: 0 0 300px;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 22px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.happening-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(26, 115, 232, 0.60), rgba(251, 188, 4, 0.52));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.happening-card:hover {
    background: #ffffff;
    transform: translateY(-8px);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.10),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(26, 26, 26, 0.12);
}

.happening-card:hover::before {
    opacity: 1;
}

.happening-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.source-icons-group {
    display: flex;
    align-items: center;
}

.source-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    max-width: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid #ffffff;
    flex-shrink: 0;
}

.happening-time {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary, #fafaf9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.happening-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.happening-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    line-clamp: 4;
    overflow: hidden;
}

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #eee;
    color: #333;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.carousel-nav:hover {
    background: var(--business-primary);
    color: white;
    border-color: var(--business-primary);
}

.carousel-nav.prev { left: -20px; }
.carousel-nav.next { right: -20px; }

/* Business Filters */
.business-filters-wrapper {
    margin: 32px 0 24px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: transparent;
    padding: 10px 0;
    border-bottom: none;
}

.filter-select-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.filter-select-item {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #ddd;
    background: white;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-select-item:hover {
    border-color: var(--business-primary);
    color: var(--business-primary);
}

.filter-select-item.active {
    background: var(--business-primary);
    color: white;
    border-color: var(--business-primary);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* Companies List View (Reusing Influencer patterns) */
.influencer-list-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #eee;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.influencer-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    padding: 16px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}

.influencer-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background 0.2s ease;
}

.influencer-row:hover {
    background: #fcfcfc;
}

.profile-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}

.influencer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #eee;
}

.profile-name {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.05rem;
}

.profile-username {
    color: #888;
    font-size: 0.9rem;
}

.stat-cell {
    font-weight: 600;
    color: #444;
}

/* Responsiveness */
@media (max-width: 768px) {
    .business-view {
        padding: 16px 16px 40px;
    }

    .category-header.business-theme h2 {
        font-size: 24px;
    }

    .category-header.business-theme .category-description {
        font-size: 14px;
    }

    .influencer-list-header {
        display: none;
    }
    
    .influencer-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }
    
    .stat-cell::before {
        content: attr(data-label) ": ";
        color: #888;
        font-weight: 400;
        width: 100px;
        display: inline-block;
    }
}

@media (max-width: 600px) {
    .happening-card {
        min-width: 260px;
        width: 260px;
        max-width: 260px;
    }

    .carousel-nav {
        display: none;
    }
}
