/* ================================================
   Athlete Recruiting Profile — Print / PDF Styles
   Triggered by: window.print() on /athlete/{slug}
   Targets the unified .ap-* class system
   ================================================ */

@media print {

    /* ——— Force background colours to print ——— */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* ——— Page geometry ——— */
    @page {
        size: A4 portrait;
        margin: 8mm 10mm;
    }

    /* ——— Hide site chrome & interactive elements ——— */
    .sidebar,
    .top-row,
    nav,
    footer,
    .no-print,
    .ap-owner-bar,
    .ap-share-btn,
    [data-bs-toggle="modal"],
    .modal,
    .modal-backdrop,
    .floating-support-btn,
    #support-ticket-modal,
    .cookie-banner,
    .toast-notification,
    .ap-cta {
        display: none !important;
    }

    /* ——— Remove Blazor sidebar / layout padding ——— */
    .page {
        display: block !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        padding-left: 0 !important;
    }

    .sidebar,
    .modern-sidebar {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    main {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    article.content,
    article.content.px-4 {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .top-row {
        display: none !important;
    }

    body {
        font-size: 10pt;
        color: #1a1a2e !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* ——— HERO SECTION ——— */
    .ap-hero {
        background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 40%, #0ea5e9 100%) !important;
        color: white !important;
        padding: 1rem 0 3rem 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        page-break-after: avoid;
        width: 100% !important;
    }

    .ap-hero::before {
        display: none !important;
    }

    .ap-hero::after {
        display: none !important;
    }

    .ap-photo,
    .ap-avatar {
        width: 100px !important;
        height: 100px !important;
        border-radius: 14px !important;
        border: 3px solid rgba(255,255,255,0.9) !important;
        box-shadow: none !important;
    }

    .ap-name {
        font-size: 1.6rem !important;
        color: white !important;
    }

    .ap-sport-badge {
        background: rgba(255,255,255,0.2) !important;
        color: white !important;
        font-size: 0.82rem !important;
        padding: 4px 12px !important;
    }

    .ap-meta-tag {
        color: rgba(255,255,255,0.9) !important;
        font-size: 0.8rem !important;
    }

    .ap-visibility-badge {
        font-size: 0.7rem !important;
        padding: 3px 10px !important;
    }

    .ap-badge-public {
        background: #22c55e !important;
        color: white !important;
    }

    /* ——— STATS STRIP ——— */
    .ap-stats-strip {
        margin-top: -24px !important;
        box-shadow: none !important;
        border: 1.5px solid #cbd5e1 !important;
        border-radius: 10px !important;
        padding: 0.8rem 1rem !important;
        background: white !important;
        page-break-inside: avoid;
    }

    .ap-stat-val {
        font-size: 1.2rem !important;
    }

    .ap-stat-lbl {
        font-size: 0.65rem !important;
    }

    /* ——— BADGE PILLS ——— */
    .ap-badge-pill {
        font-size: 0.78rem !important;
        padding: 4px 10px !important;
    }

    /* ——— TWO-COLUMN LAYOUT — full width ——— */
    .row.g-4 {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }

    .col-lg-8 {
        flex: 0 0 62% !important;
        max-width: 62% !important;
        width: 62% !important;
    }

    .col-lg-4 {
        flex: 0 0 38% !important;
        max-width: 38% !important;
        width: 38% !important;
    }

    /* ——— CONTENT CARDS ——— */
    .ap-card {
        box-shadow: none !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 10px !important;
        padding: 1rem 1.25rem !important;
        margin-bottom: 0.8rem !important;
        page-break-inside: avoid;
        transition: none !important;
        transform: none !important;
    }

    .ap-card:hover {
        box-shadow: none !important;
        transform: none !important;
    }

    .ap-card-hdr {
        font-size: 0.85rem !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 0.8rem !important;
    }

    /* ——— BIO CARD — preserve dark background ——— */
    .ap-bio-card {
        background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%) !important;
        color: white !important;
        border: none !important;
    }

    .ap-bio-card::before {
        display: none !important;
    }

    .ap-bio-card p {
        color: rgba(255,255,255,0.92) !important;
        font-size: 0.9rem !important;
        line-height: 1.7 !important;
    }

    /* ——— HIGHLIGHT BOXES ——— */
    .ap-highlight-box {
        page-break-inside: avoid;
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .ap-highlight-box.gold {
        background: #fffbeb !important;
        border: 1px solid #fde68a !important;
    }

    .ap-highlight-box.emerald {
        background: #ecfdf5 !important;
        border: 1px solid #a7f3d0 !important;
    }

    /* ——— GPA HERO ——— */
    .ap-gpa-hero {
        page-break-inside: avoid;
        background: #ecfdf5 !important;
        border: 1px solid #6ee7b7 !important;
        padding: 0.75rem !important;
    }

    .ap-gpa-icon {
        background: linear-gradient(135deg, #10b981, #059669) !important;
        width: 48px !important;
        height: 48px !important;
    }

    .ap-gpa-val {
        font-size: 1.6rem !important;
        color: #059669 !important;
    }

    /* ——— TEST SCORE PILLS ——— */
    .ap-score-pill {
        border: 1.5px solid #bae6fd !important;
        background: white !important;
        padding: 5px 12px !important;
        margin: 2px !important;
    }

    .ap-score-pill .pill-label {
        font-size: 0.65rem !important;
    }

    .ap-score-pill .pill-val {
        font-size: 1rem !important;
        color: #0ea5e9 !important;
    }

    /* ——— SIDEBAR FACTS ——— */
    .ap-fact {
        padding: 6px 0 !important;
    }

    .ap-fact-icon {
        width: 30px !important;
        height: 30px !important;
        border-radius: 8px !important;
        font-size: 0.75rem !important;
    }

    /* ——— COACH CARD ——— */
    .ap-coach {
        background: #f0f9ff !important;
        border: 1px solid #bae6fd !important;
        padding: 0.75rem 1rem !important;
    }

    /* ——— SOCIAL ICONS — show as labeled links ——— */
    .ap-social {
        width: 32px !important;
        height: 32px !important;
        border-radius: 8px !important;
        font-size: 0.9rem !important;
    }

    .ap-social.ig { background: #e4405f !important; color: white !important; }
    .ap-social.tw { background: #000 !important; color: white !important; }
    .ap-social.fb { background: #4267b2 !important; color: white !important; }
    .ap-social.tt { background: #010101 !important; color: #fe2c55 !important; }
    .ap-social.li { background: #0077b5 !important; color: white !important; }
    .ap-social.link { background: #f1f5f9 !important; color: #475569 !important; }

    /* ——— VIDEOS — hide iframes (can't print video) ——— */
    .ap-video {
        display: none !important;
    }

    .ap-video + .d-flex,
    .carousel {
        display: none !important;
    }

    /* Show a placeholder message for videos */
    .ap-card:has(.ap-video)::after {
        content: '📹 Highlight videos available online at the profile URL';
        display: block;
        font-size: 0.8rem;
        color: #64748b;
        font-style: italic;
        padding: 0.5rem 0;
    }

    /* ——— CAREER GOALS CARD — preserve purple tint ——— */
    .ap-card[style*="faf5ff"] {
        background: #faf5ff !important;
        border: 1px solid #ddd6fe !important;
    }

    /* ——— COLLEGE PREFERENCES — preserve top border ——— */
    .ap-card[style*="border-top:4px solid #0ea5e9"] {
        border-top: 4px solid #0ea5e9 !important;
    }

    /* ——— LABELS & VALUES ——— */
    .ap-lbl {
        font-size: 0.68rem !important;
        color: #64748b !important;
    }

    .ap-val {
        font-size: 0.88rem !important;
    }

    /* ——— PAGE BREAK HELPERS ——— */
    h1, h2, h3, h4, h5 {
        page-break-after: avoid;
    }

    .ap-card-hdr {
        page-break-after: avoid;
    }

    /* ——— PRINT FOOTER ATTRIBUTION ——— */
    .ap-cta {
        display: none !important;
    }
}
