﻿/* 🌐 Shared visual texture */
:root {
    --league-accent: #004080; /* fallback, overridden in Razor */
    --grain-bg: url('/images/paper-grain.png');
    --grain-blend: multiply;
    --grain-filter: brightness(0.95) contrast(0.85);
}

/* 🧭 Header layout — name line on top, photo + honors panel below.
   Namespaced with pc- prefix to avoid colliding with Bootstrap/site .card-header. */
.pc-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    width: 100%;
}

.pc-name-line {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
    text-align: left;
}

.pc-name-line .pc-meta {
    font-weight: 400;
    font-size: 0.95rem;
    color: #6c757d;
}

.pc-header-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
}

/* 🏆 Career honors panel */
.pc-honors-box {
    flex: 1 1 auto;
    min-width: 220px;
    max-width: 720px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Height set via --card-frame-h CSS variable from Razor */
    height: var(--card-frame-h);
}

.pc-honors-box-header {
    background: var(--league-accent, #004080);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    flex: 0 0 auto;
}

.pc-honors-box-body {
    column-width: 220px;
    column-gap: 1.25rem;
    column-fill: auto;
    padding: 8px 12px;
    overflow: hidden;
    flex: 1 1 auto;
}

.pc-honor-item {
    display: block;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #212529;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    cursor: default;
}

.pc-honor-item:hover {
    color: var(--league-accent, #004080);
}

.pc-honor-icon {
    display: inline-block;
    width: 1.3em;
    text-align: center;
    margin-right: 2px;
}

@media (max-width: 768px) {
    .pc-header-body {
        flex-direction: column;
    }
    .pc-honors-box {
        max-width: none;
        width: 100%;
    }
    .pc-honors-box-body {
        column-width: auto;
        column-count: 1;
        height: auto;
    }
}

/* 🖼️ Card frame with texture and shadow */
.card-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    padding: 3px;
    background: linear-gradient(160deg, #e8edf2 0%, #d0d8e4 50%, #c8d2df 100%);
    border: 1px solid #999;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    filter: brightness(0.98) contrast(0.95);
    flex-shrink: 0;
}

/* 🖼️ Photo wrapper */
.card-photo-wrapper {
    position: relative;
    width: 100%;
}

/* 🖼️ Player photo */
.card-photo {
    width: 100%;
    height: 168px;           /* 5:7 ratio for 120px wide — standard baseball card */
    object-fit: cover;
    object-position: top center;
    display: block;
    background: white;       /* solid white behind transparent PNGs */
}

/* 🏷️ Team and position labels */
.team-label,
.position-label {
    position: absolute;
    background-color: #c00;
    color: white;
    font-weight: bold;
    font-size: 0.6rem;
    padding: 2px 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    line-height: 1;
    background-image: var(--grain-bg);
    background-size: cover;
    background-blend-mode: var(--grain-blend);
    filter: var(--grain-filter);
}

.team-label {
    top: 0;
    left: 0;
}

.position-label {
    bottom: 0;
    right: 0;
}

/* 🃏 Horizontal (landscape) card — modern baseball */
.card-frame-h {
    width: 210px;
}

.card-frame-h .card-photo {
    height: 150px;   /* 5:7 landscape ratio for 210px wide */
}

/* 🖋️ Nameplate banner */
.script-nameplate {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 2px 0;
    text-align: center;
    line-height: 1.1;
    font-size: 0.95rem;
    font-family: 'Brush Script MT', cursive;
    color: white;
    background-color: var(--league-accent, #004080);
    background-image: var(--grain-bg);
    background-size: cover;
    background-blend-mode: var(--grain-blend);
    filter: var(--grain-filter);
    border-radius: 0 0 4px 4px;
}
