/* ============================================================
   cards-addon.css  –  API-driven card components
   Add this block to the BOTTOM of pages.css
   (or @import it after pages.css in your HTML heads)
   ============================================================ */

/* ── Shared token reuse ────────────────────────────────────── */
/* Uses existing vars: --primary-red, --dark-black, --light-black,
   --accent-gold, --hover-red, --light-text                     */

/* ══════════════════════════════════════════════════════════════
   1. FIGHTER CARD   (.fighter-card)
   Replaces the old .full-width-card layout in
   boxing-fighters.php and mma-fighters.php
   ══════════════════════════════════════════════════════════════ */
.fighters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

.fighter-card {
    background: var(--light-black);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}
.fighter-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(229, 9, 20, 0.18);
    border-color: var(--primary-red);
}

/* Head row: avatar + name block */
.fc-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 14px;
}

.fc-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-red);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.25);
}

.fc-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.fc-alias {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-style: italic;
    margin-top: 2px;
}

.fc-div {
    /* extends .wbadge defined below */
    margin-top: 6px;
    display: inline-block;
}

/* Stat row */
.fc-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.35);
    padding: 14px 10px;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
}

.fc-stats .stat { text-align: center; }
.fc-stats .sv {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
}
.fc-stats .sl {
    font-size: 0.68rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 3px;
}

/* Meta pills row */
.fc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 20px 18px;
}

.fc-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #333;
    color: #bbb;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* "View Profile" CTA appended inside the card in PHP */
.fc-profile-link {
    display: block;
    text-align: center;
    margin: 0 20px 20px;
    padding: 9px 0;
    background: var(--primary-red);
    color: #fff;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}
.fc-profile-link:hover { background: var(--hover-red); color: #fff; }


/* ══════════════════════════════════════════════════════════════
   2. EVENT CARD   (.event-card)
   Replaces old event list items in events pages
   ══════════════════════════════════════════════════════════════ */
.event-card {
    background: var(--light-black);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}
.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(229, 9, 20, 0.18);
    border-color: var(--primary-red);
}

/* Poster area — fixed 16:9 */
.ev-poster,
.ev-poster-ph {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #1c1c1c;
}
.ev-poster-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #444;
}

.ev-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ev-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.25;
}

.ev-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ev-meta .meta {
    font-size: 0.82rem;
    color: #999;
}


/* ══════════════════════════════════════════════════════════════
   3. FIGHT CARD   (.fight-card)
   Used in events/fight-list pages
   ══════════════════════════════════════════════════════════════ */
.fight-card {
    background: var(--light-black);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.fight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(229, 9, 20, 0.16);
    border-color: var(--primary-red);
}

/* Poster */
.card-poster,
.card-poster-ph {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--bg1);
}
.card-poster-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #444;
}

/* Top bar: event name + status badge */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 6px;
    gap: 8px;
}

.card-event {
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Status badges */
.status-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.status-badge.finished  { background: #1a6e1a; color: #6efb6e; }
.status-badge.live      { background: var(--primary-red); color: #fff; animation: pulse-badge 1.2s infinite; }
.status-badge.upcoming  { background: #1c3a6e; color: #8ab4f8; }
.status-badge.cancelled { background: #4a1a1a; color: #f08080; }
.status-badge.default   { background: #2a2a2a; color: #999; }

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

/* Matchup section */
.matchup {
    display: flex;
    align-items: center;
    padding: 14px 16px 8px;
    gap: 8px;
}

.matchup .fighter { flex: 1; }
.matchup .fighter.r { text-align: right; }

.matchup .fname {
    font-size: 1rem;
    font-weight: 700;
    color: #e0e0e0;
    text-transform: uppercase;
    line-height: 1.2;
}
.matchup .fname.winner { color: #6efb6e; }
.matchup .fname.loser  { color: #888; }

.vs-col {
    text-align: center;
    flex-shrink: 0;
    min-width: 54px;
}
.vs-col .vs {
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-gold);
}
.vs-col .outcome {
    font-size: 0.68rem;
    color: #aaa;
    margin-top: 3px;
    line-height: 1.3;
}

/* Footer bar */
.card-foot {
    padding: 8px 16px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    border-top: 1px solid #2a2a2a;
}

.card-foot .meta {
    font-size: 0.78rem;
    color: #888;
    flex: 1;
}

/* Weight/division badge — shared with fighter card */
.wbadge {
    display: inline-block;
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.35);
    color: #f88;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* Title chips strip */
.titles-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 16px 14px;
}

.title-chip {
    display: inline-block;
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--accent-gold);
    font-size: 0.67rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}


/* ══════════════════════════════════════════════════════════════
   4. DIVISION CARD   (.div-card)
   New — used in fighter-profile.php sidebar / division browser
   ══════════════════════════════════════════════════════════════ */
.divisions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.div-card {
    background: var(--light-black);
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.div-card:hover {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.06);
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.12);
}
.div-card.active {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.1);
}

.div-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.2;
}

.div-weights {
    font-size: 0.78rem;
    color: #999;
}


/* ══════════════════════════════════════════════════════════════
   5. TITLE CARD   (.title-card)
   New — used in fighter-profile.php titles section
   ══════════════════════════════════════════════════════════════ */
.titles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.title-card {
    background: linear-gradient(135deg, rgba(255,215,0,0.07) 0%, rgba(30,20,0,0.6) 100%);
    border: 1px solid rgba(255, 215, 0, 0.22);
    border-radius: 10px;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.title-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 18px rgba(255, 215, 0, 0.12);
}

.title-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.25;
}

.title-org {
    font-size: 0.8rem;
    color: #ccc;
}

.title-div {
    font-size: 0.78rem;
    color: #888;
}


/* ══════════════════════════════════════════════════════════════
   6. FIGHTER PROFILE PAGE — extra info grid items
   Extends fighter-profile.css info-grid with API field names
   ══════════════════════════════════════════════════════════════ */

/* Stance / reach / height pills in the profile header */
.profile-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.profile-pill {
    background: rgba(255,255,255,0.07);
    border: 1px solid #333;
    color: #ccc;
    font-size: 0.78rem;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.profile-pill strong { color: #fff; }


/* ══════════════════════════════════════════════════════════════
   7. SEARCH / FILTER BAR  (shared across fighter & event grids)
   ══════════════════════════════════════════════════════════════ */
.cards-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
}

.cards-search {
    flex: 1;
    min-width: 200px;
    background: var(--dark-black);
    border: 1px solid #333;
    border-radius: 24px;
    color: #fff;
    padding: 8px 18px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.cards-search:focus { border-color: var(--primary-red); }
.cards-search::placeholder { color: #555; }


/* ══════════════════════════════════════════════════════════════
   8. RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .fighters-grid { grid-template-columns: 1fr; }
    .divisions-grid { grid-template-columns: repeat(2, 1fr); }
    .titles-grid { grid-template-columns: 1fr; }

    .matchup .fname { font-size: 0.88rem; }
    .fc-name { font-size: 1rem; }
    .fc-stats .sv { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .divisions-grid { grid-template-columns: 1fr; }
    .fighters-grid  { gap: 16px; }
}
