/**
 * serviceBadge.css - Streaming Service Badge Component Styles
 *
 * SINGLE SOURCE OF TRUTH for streaming service badges.
 * All views should use these classes - NO custom styles elsewhere.
 *
 * Usage:
 *   <div class="streaming-badge">              Default size (20px)
 *   <div class="streaming-badge streaming-badge-sm">  Small (16px) - mobile/compact
 *   <div class="streaming-badge streaming-badge-lg">  Large (32px) - tables/detail views
 *
 * Position variants (for poster overlays):
 *   .streaming-badge-poster   - Absolute positioned, bottom-right above banners
 */

/* ============================================================
   BASE BADGE CONTAINER
   ============================================================ */
.streaming-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    padding: 3px 5px;
    z-index: 5;
}

/* ============================================================
   SERVICE LOGO - Default size (20px)
   Also targets .streaming-badge img for TitleCardHelper which
   generates img tags without the service-logo class
   ============================================================ */
.streaming-badge img,
.streaming-badge .service-logo,
.service-logo {
    height: 20px;
    max-width: 40px;
    object-fit: contain;
    border-radius: 2px;
    vertical-align: middle;
}

/* ============================================================
   SIZE VARIANTS
   ============================================================ */

/* Small - for mobile and compact cards */
.streaming-badge-sm img,
.streaming-badge-sm .service-logo,
.streaming-badge.streaming-badge-sm .service-logo,
.service-logo-sm {
    height: 16px;
    max-width: 32px;
}

.streaming-badge-sm {
    padding: 2px 3px;
}

/* Large - for tables, detail views */
.streaming-badge-lg img,
.streaming-badge-lg .service-logo,
.streaming-badge.streaming-badge-lg .service-logo,
.service-logo-lg {
    height: 32px;
    max-width: 80px;
}

.streaming-badge-lg {
    padding: 4px 6px;
}

/* ============================================================
   POSITION VARIANT - Poster overlay (bottom-right, above banners)
   ============================================================ */
.streaming-badge-poster {
    position: absolute;
    bottom: 28px;  /* Above release strip / "Own" banner */
    right: 6px;
}

/* ============================================================
   BADGE TYPE VARIANTS
   ============================================================ */

/* Theatrical release */
.streaming-badge-theatrical {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    font-size: 0.85rem;
}

/* Paid/Rental */
.streaming-badge-paid {
    background: rgba(25, 135, 84, 0.9);
    color: white;
    font-size: 0.85rem;
}

/* Text-only badge */
.streaming-badge-text {
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Broadcast network badge (ABC/NBC/CBS/FOX) */
.streaming-badge-broadcast {
    background: rgba(13, 110, 253, 0.9);
    border: 2px solid #0d6efd;
    box-shadow: 0 0 3px rgba(13, 110, 253, 0.5);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    gap: 3px;
}

.streaming-badge-broadcast .broadcast-network-name {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   SUBSCRIPTION STATUS BORDERS
   ============================================================ */

/* Green border: User subscribes to this service */
.streaming-badge-subscribed {
    border: 2px solid #198754;
    box-shadow: 0 0 3px rgba(25, 135, 84, 0.5);
}

/* Red border: User doesn't subscribe */
.streaming-badge-unsubscribed {
    border: 2px solid #dc3545;
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.5);
}

/* Yellow border: Free service user hasn't selected */
.streaming-badge-free {
    border: 2px solid #ffc107;
    box-shadow: 0 0 3px rgba(255, 193, 7, 0.5);
}

/* Blue border: title is available to stream (guest — no subscription context) */
.streaming-badge-available {
    border: 2px solid #0d6efd;
    box-shadow: 0 0 3px rgba(13, 110, 253, 0.4);
}

/* Red border: Rent/buy only — title costs money to watch */
.streaming-badge-rentbuy {
    border: 2px solid #dc3545;
    color: #dc3545;
    font-weight: 700;
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.5);
}

/* ============================================================
   INTERACTIVE STATES
   ============================================================ */

/* Clickable badges */
.streaming-badge[onclick],
.streaming-badge-clickable {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.streaming-badge[onclick]:hover,
.streaming-badge-clickable:hover {
    transform: scale(1.1);
}

/* Non-clickable badges */
.streaming-badge:not([onclick]):not(.streaming-badge-clickable) {
    cursor: default;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 576px) {
    /* On mobile, default to small size */
    .streaming-badge img,
    .streaming-badge .service-logo,
    .service-logo {
        height: 16px;
        max-width: 32px;
    }

    .streaming-badge {
        padding: 2px 3px;
    }

    /* Poster badges move up a bit more on mobile */
    .streaming-badge-poster {
        bottom: 28px;
        right: 4px;
    }
}
