/* ======================================================
   FC Hub – Frontend Styles
   ====================================================== */

:root {
    --fc-primary:    #1a3a6b;
    --fc-secondary:  #e8c84a;
    --fc-green:      #28a745;
    --fc-red:        #dc3545;
    --fc-card-bg:    #ffffff;
    --fc-body-bg:    #f4f6f9;
    --fc-border:     #e2e8f0;
    --fc-text:       #2d3748;
    --fc-muted:      #718096;
}

/* ── Buttons ───────────────────────────────────────────── */
.fchub-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}
.fchub-btn-primary {
    background: var(--fc-primary);
    color: white !important;
}
.fchub-btn-primary:hover { background: #0d2347; color:white !important; }
.fchub-btn-gold {
    background: var(--fc-secondary);
    color: #0a1628 !important;
    font-weight: bold;
}
.fchub-btn-gold:hover { background: #d4b000; }
.fchub-btn-sm {
    padding: 6px 14px;
    font-size: 0.8em;
    background: #f0f4f8;
    color: var(--fc-primary) !important;
    border: 1px solid var(--fc-border);
}
.fchub-btn-sm:hover { background: var(--fc-border); }
.fchub-btn-sponsor {
    background: linear-gradient(135deg, #1a3a6b, #2d5a9b);
    color: white !important;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85em;
    display: block;
    text-align: center;
    margin: 4px 0;
    transition: transform 0.2s;
}
.fchub-btn-sponsor:hover { transform: translateY(-1px); }
.fchub-btn-taken {
    background: #f0f0f0;
    color: #999;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85em;
    display: block;
    text-align: center;
    margin: 4px 0;
    cursor: not-allowed;
}

/* ── Wallet ────────────────────────────────────────────── */
.fchub-wallet {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 100%;
}
.fchub-wallet-header {
    margin-bottom: 24px;
}
.fchub-wallet-header h2 {
    font-size: 1.8em;
    color: var(--fc-primary);
    margin-bottom: 4px;
}
.fchub-wallet-subtitle { color: var(--fc-muted); font-size: 0.95em; }

/* Tabs */
.fchub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--fc-border);
    padding-bottom: 0;
}
.fchub-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--fc-muted);
    cursor: pointer;
    position: relative;
    bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.fchub-tab:hover { color: var(--fc-primary); }
.fchub-tab.active {
    color: var(--fc-primary);
    border-bottom-color: var(--fc-primary);
}
.fchub-badge {
    background: var(--fc-primary);
    color: white;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 0.75em;
}

.fchub-tab-content { display: none; }
.fchub-tab-content.active { display: block; }

/* Empty state */
.fchub-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--fc-muted);
}
.fchub-empty-icon { font-size: 3em; display:block; margin-bottom:12px; }

/* ── Ticket Cards ───────────────────────────────────────── */
.fchub-tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.fchub-ticket-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.fchub-ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.fchub-ticket-header {
    background: linear-gradient(135deg, var(--fc-primary), #0d2347);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fchub-ticket-type { font-size: 0.8em; opacity: 0.8; }
.fchub-ticket-status { font-size: 0.8em; }
.fchub-ticket-body { padding: 16px; }
.fchub-ticket-body h4 { font-size: 1em; margin-bottom: 8px; color: var(--fc-text); }
.fchub-ticket-date, .fchub-ticket-seat { font-size: 0.85em; color: var(--fc-muted); margin: 4px 0; }
.fchub-ticket-code { margin-top: 10px; }
.fchub-ticket-code code { background: #f0f4f8; padding: 4px 8px; border-radius: 4px; font-size: 0.75em; color: var(--fc-primary); letter-spacing: 1px; }
.fchub-ticket-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid var(--fc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.fchub-qr-container { width: 80px; height: 80px; }
.fchub-qr-container img, .fchub-qr-container canvas { width: 80px !important; height: 80px !important; }

/* Status colors */
.fchub-status-valid    .fchub-ticket-header { background: linear-gradient(135deg, #1a3a6b, #0d2347); }
.fchub-status-used     .fchub-ticket-header { background: linear-gradient(135deg, #4a6741, #2d4a28); opacity:0.8; }
.fchub-status-cancelled .fchub-ticket-header{ background: linear-gradient(135deg, #721c24, #4a1218); }
.fchub-status-expired  .fchub-ticket-header { background: linear-gradient(135deg, #856404, #5a4302); }

/* ── Season Cards ───────────────────────────────────────── */
.fchub-season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.fchub-season-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-top: 4px solid var(--fc-secondary);
    position: relative;
}
.fchub-season-card.expired { opacity:0.6; }
.fchub-season-badge {
    position: absolute;
    top: 16px; right: 16px;
    font-size: 0.8em;
    font-weight: 600;
}
.fchub-season-card h4 { font-size: 1.2em; margin-bottom: 8px; color: var(--fc-primary); }
.fchub-season-card p  { font-size: 0.85em; color: var(--fc-muted); margin: 4px 0; }

/* ── Sponsorship Cards ──────────────────────────────────── */
.fchub-sponsor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.fchub-sponsorship-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-top: 4px solid var(--fc-secondary);
}
.fchub-spons-player {
    display: flex;
    gap: 16px;
    padding: 20px;
    align-items: center;
}
.fchub-spons-player img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--fc-secondary);
}
.fchub-player-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fc-primary), #2d5a9b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    flex-shrink: 0;
}
.fchub-spons-details h4 { font-size: 1.1em; color: var(--fc-text); margin-bottom: 6px; }
.fchub-spons-details p  { font-size: 0.85em; color: var(--fc-muted); margin: 3px 0; }
.fchub-spons-amount { font-size: 1.1em !important; font-weight: bold !important; color: var(--fc-primary) !important; }
.fchub-spons-actions {
    padding: 12px 20px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Sponsor Page ───────────────────────────────────────── */
.fchub-sponsor-page { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.fchub-sponsor-header { margin-bottom: 24px; }
.fchub-sponsor-header h2 { font-size: 1.8em; color: var(--fc-primary); }
.fchub-sponsor-header p  { color: var(--fc-muted); margin-top: 8px; }

.fchub-sponsor-filters { margin-bottom: 24px; }
.fchub-search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid var(--fc-border);
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s;
}
.fchub-search-input:focus { border-color: var(--fc-primary); }

.fchub-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.fchub-player-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.fchub-player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.fchub-player-photo {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #0d2347, #1a3a6b);
}
.fchub-player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.fchub-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    background: linear-gradient(135deg, #0d2347, #1a3a6b);
}
.fchub-photo-placeholder span { color: var(--fc-secondary); font-weight: bold; }

.fchub-player-details { padding: 16px; }
.fchub-player-details h3 { font-size: 1.2em; color: var(--fc-text); margin-bottom: 4px; }
.fchub-player-number { font-size: 0.85em; color: var(--fc-secondary); font-weight: bold; margin: 2px 0; }
.fchub-player-pos    { font-size: 0.8em; color: var(--fc-muted); }

.fchub-spons-status {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.fchub-kit-badge {
    font-size: 0.72em;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}
.fchub-kit-badge.available { background: #d4edda; color: #155724; }
.fchub-kit-badge.taken     { background: #f8d7da; color: #721c24; }

.fchub-current-sponsors {
    margin-top: 8px;
    font-size: 0.8em;
}
.fchub-mini-sponsor {
    display: inline-block;
    background: #f0f4f8;
    color: var(--fc-primary);
    padding: 2px 8px;
    border-radius: 12px;
    margin: 2px;
    font-size: 0.9em;
}

.fchub-sponsor-options { padding: 12px 16px 16px; border-top: 1px solid var(--fc-border); }
.fchub-sponsor-options h5 { font-size: 0.85em; color: var(--fc-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.fchub-no-products { padding: 12px 16px; color: var(--fc-muted); font-size: 0.85em; }

/* ── Player Sponsors (on sp_player page) ────────────────── */
.fchub-player-sponsors {
    margin: 30px 0;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9ff, #fff);
    border-radius: 12px;
    border: 1px solid var(--fc-border);
}
.fchub-player-sponsors h3 { font-size: 1.3em; color: var(--fc-primary); margin-bottom: 16px; }
.fchub-sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.fchub-sponsor-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--fc-secondary);
}
.fchub-sponsor-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fc-primary), #2d5a9b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    flex-shrink: 0;
}
.fchub-sponsor-info { display: flex; flex-direction: column; }
.fchub-sponsor-info strong { color: var(--fc-text); font-size: 0.95em; }
.fchub-sponsor-info span   { color: var(--fc-muted); font-size: 0.8em; }
.fchub-sponsor-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--fc-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85em;
}
.fchub-sponsor-pill span { color: var(--fc-muted); }

/* ── Event Tickets (on sp_event page) ───────────────────── */
.fchub-event-tickets {
    margin: 24px 0;
    padding: 24px;
    background: linear-gradient(135deg, #0d2347, #1a3a6b);
    color: white;
    border-radius: 12px;
}
.fchub-event-tickets h3 { font-size: 1.3em; margin-bottom: 12px; }
.fchub-event-tickets p  { margin: 6px 0; opacity:0.9; }

/* ── Product Meta (on WC product) ───────────────────────── */
.fchub-product-meta {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border-left: 4px solid var(--fc-primary);
}
.fchub-product-meta p  { margin: 6px 0; font-size: 0.9em; }
.fchub-label { font-weight: bold; color: var(--fc-primary); }
.fchub-player-card.fchub-product-meta { display: flex; align-items: center; gap: 16px; }
.fchub-player-card.fchub-product-meta img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }

/* ── Match List (shortcode) ─────────────────────────────── */
.fchub-match-list { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.fchub-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.fchub-match-info strong { display:block; color: var(--fc-text); }
.fchub-match-date { font-size:0.85em; color: var(--fc-muted); }
.fchub-match-ticket-btn { display:flex; align-items:center; gap:12px; }
.fchub-no-tickets { color: var(--fc-muted); font-size:0.85em; }

/* ── Fan Profile ────────────────────────────────────────── */
.fchub-fan-profile { font-family: -apple-system, sans-serif; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .fchub-tabs { flex-wrap:wrap; }
    .fchub-tab  { padding: 8px 12px; font-size:0.8em; }
    .fchub-tickets-grid, .fchub-season-grid, .fchub-sponsor-cards, .fchub-players-grid {
        grid-template-columns: 1fr;
    }
    .fchub-match-row { flex-direction:column; align-items:flex-start; gap:12px; }
    .fchub-spons-player { flex-direction:column; text-align:center; }
}
