/**
 * ================================================================
 * SPORTSBOOK FAVORITES SYSTEM - STYLING
 * ================================================================
 * Professional BetConstruct/Bet365-style favorites
 * - Match favorite icons
 * - League favorite icons
 * - Country favorite icons  
 * - Favorites view
 * - Count badge
 * ================================================================
 */

/* ============================================================
   FAVORITE BADGE ON NAVIGATION BUTTON
   ============================================================ */

#bcSbFavoritesBtn {
    position: relative;
}

.bc-sb-favorites-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--bc-sb-primary, #FF6B00);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    pointer-events: none;
    z-index: 1;
}

.bc-sb-favorites-badge:empty {
    display: none;
}

/* ============================================================
   FAVORITE ICONS (HEART/STAR)
   ============================================================ */

.bc-sb-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bc-sb-text-muted, #7e8a9a);
    transition: color 0.15s ease, transform 0.1s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.bc-sb-favorite-btn:hover {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-favorite-btn:active {
    transform: scale(0.92);
}

.bc-sb-favorite-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    transition: fill 0.15s ease;
}

/* Active (favorited) state */
.bc-sb-favorite-btn--active {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-favorite-btn--active svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Smaller variant for compact rows */
.bc-sb-favorite-btn--small {
    width: 32px;
    height: 32px;
    min-width: 32px;
}

.bc-sb-favorite-btn--small svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   MATCH CARD FAVORITE BUTTON
   ============================================================ */

.bc-sb-event__favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bc-sb-text-muted, #7e8a9a);
    transition: color 0.15s ease, transform 0.1s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.bc-sb-event__favorite:hover {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-event__favorite:active {
    transform: scale(0.92);
}

.bc-sb-event__favorite svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    transition: fill 0.15s ease;
}

/* Active state - filled heart */
.bc-sb-event__favorite[aria-pressed="true"] {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-event__favorite[aria-pressed="true"] svg {
    fill: currentColor;
    stroke: currentColor;
}

/* ============================================================
   LEAGUE ROW FAVORITE BUTTON
   ============================================================ */

.bc-sb-league__favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bc-sb-text-muted, #7e8a9a);
    transition: color 0.15s ease, transform 0.1s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.bc-sb-league__favorite:hover {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-league__favorite:active {
    transform: scale(0.92);
}

.bc-sb-league__favorite svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    transition: fill 0.15s ease;
}

.bc-sb-league__favorite--active {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-league__favorite--active svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Update league content layout to accommodate favorite button */
.bc-sb-league__content {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

/* ============================================================
   COUNTRY ROW FAVORITE BUTTON
   ============================================================ */

.bc-sb-country__favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bc-sb-text-muted, #7e8a9a);
    transition: color 0.15s ease, transform 0.1s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.bc-sb-country__favorite:hover {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-country__favorite:active {
    transform: scale(0.92);
}

.bc-sb-country__favorite svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    transition: fill 0.15s ease;
}

.bc-sb-country__favorite--active {
    color: var(--bc-sb-primary, #FF6B00);
}

.bc-sb-country__favorite--active svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Update country header layout */
.bc-sb-country__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   FAVORITES VIEW
   ============================================================ */

.bc-sb-favorites-view {
    padding: 16px;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Favorites section headers */
.bc-sb-favorites-section {
    margin-bottom: 24px;
}

.bc-sb-favorites-section:last-child {
    margin-bottom: 0;
}

.bc-sb-favorites-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bc-sb-border, rgba(0, 0, 0, 0.08));
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bc-sb-text-muted, #7e8a9a);
}

.bc-sb-favorites-section-title svg {
    width: 16px;
    height: 16px;
}

/* Empty state */
.bc-sb-favorites-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.bc-sb-favorites-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    color: var(--bc-sb-text-muted, #7e8a9a);
    opacity: 0.3;
}

.bc-sb-favorites-empty-title {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--bc-sb-text, #1a2332);
}

.bc-sb-favorites-empty-text {
    max-width: 300px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--bc-sb-text-muted, #7e8a9a);
}

/* Clear all button */
.bc-sb-favorites-clear {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-top: 24px;
    background: transparent;
    border: 1px solid var(--bc-sb-border, rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bc-sb-text, #1a2332);
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-sb-favorites-clear:hover {
    background: var(--bc-sb-bg-hover, rgba(0, 0, 0, 0.04));
    border-color: var(--bc-sb-border-hover, rgba(0, 0, 0, 0.12));
}

.bc-sb-favorites-clear:active {
    transform: scale(0.98);
}

/* ============================================================
   FAVORITES - MATCH CARDS
   ============================================================ */

.bc-sb-favorites-match {
    margin-bottom: 8px;
}

/* Reuse existing match card styles */
.bc-sb-favorites-match .bc-sb-match-card {
    /* Inherits from main match card styles */
}

/* ============================================================
   FAVORITES - LEAGUE ROWS
   ============================================================ */

.bc-sb-favorites-league {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: var(--bc-sb-bg, #fff);
    border: 1px solid var(--bc-sb-border, rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-sb-favorites-league:hover {
    background: var(--bc-sb-bg-hover, rgba(0, 0, 0, 0.02));
    border-color: var(--bc-sb-border-hover, rgba(0, 0, 0, 0.12));
}

.bc-sb-favorites-league__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.bc-sb-favorites-league__name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bc-sb-text, #1a2332);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-sb-favorites-league__count {
    font-size: 13px;
    font-weight: 700;
    color: var(--bc-sb-text-muted, #7e8a9a);
    flex-shrink: 0;
}

.bc-sb-favorites-league__chevron {
    width: 16px;
    height: 16px;
    color: var(--bc-sb-text-muted, #7e8a9a);
    flex-shrink: 0;
}

/* ============================================================
   FAVORITES - TEAM ROWS
   ============================================================ */

.bc-sb-favorites-team {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: var(--bc-sb-bg, #fff);
    border: 1px solid var(--bc-sb-border, rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-sb-favorites-team:hover {
    background: var(--bc-sb-bg-hover, rgba(0, 0, 0, 0.02));
    border-color: var(--bc-sb-border-hover, rgba(0, 0, 0, 0.12));
}

.bc-sb-favorites-team__name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bc-sb-text, #1a2332);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-sb-favorites-team__chevron {
    width: 16px;
    height: 16px;
    color: var(--bc-sb-text-muted, #7e8a9a);
    flex-shrink: 0;
}

/* ============================================================
   FAVORITES - COUNTRY ROWS
   ============================================================ */

.bc-sb-favorites-country {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: var(--bc-sb-bg, #fff);
    border: 1px solid var(--bc-sb-border, rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bc-sb-favorites-country:hover {
    background: var(--bc-sb-bg-hover, rgba(0, 0, 0, 0.02));
    border-color: var(--bc-sb-border-hover, rgba(0, 0, 0, 0.12));
}

.bc-sb-favorites-country__flag {
    font-size: 24px;
    flex-shrink: 0;
}

.bc-sb-favorites-country__name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bc-sb-text, #1a2332);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-sb-favorites-country__count {
    font-size: 13px;
    font-weight: 700;
    color: var(--bc-sb-text-muted, #7e8a9a);
    flex-shrink: 0;
}

.bc-sb-favorites-country__chevron {
    width: 16px;
    height: 16px;
    color: var(--bc-sb-text-muted, #7e8a9a);
    flex-shrink: 0;
}

/* ============================================================
   LIVE BADGE FOR FAVORITE MATCHES
   ============================================================ */

.bc-sb-favorites-match .bc-sb-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: var(--bc-sb-live, #FF1744);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    letter-spacing: 0.05em;
}

.bc-sb-favorites-match .bc-sb-live-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: bc-sb-live-pulse 2s ease-in-out infinite;
}

@keyframes bc-sb-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================================
   MOBILE RESPONSIVENESS
   ============================================================ */

@media (max-width: 767px) {
    .bc-sb-favorites-view {
        padding: 12px;
    }
    
    .bc-sb-favorites-empty {
        padding: 40px 20px;
    }
    
    .bc-sb-favorites-section {
        margin-bottom: 20px;
    }
    
    /* Smaller favorite buttons on mobile */
    .bc-sb-country__favorite,
    .bc-sb-league__favorite {
        width: 32px;
        height: 32px;
    }
    
    .bc-sb-country__favorite svg,
    .bc-sb-league__favorite svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.bc-sb-favorite-btn:focus-visible,
.bc-sb-event__favorite:focus-visible,
.bc-sb-league__favorite:focus-visible,
.bc-sb-country__favorite:focus-visible {
    outline: 2px solid var(--bc-sb-primary, #FF6B00);
    outline-offset: 2px;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    .bc-sb-favorite-btn,
    .bc-sb-event__favorite,
    .bc-sb-league__favorite,
    .bc-sb-country__favorite,
    .bc-sb-favorites-badge {
        display: none !important;
    }
}
