/* Gymnast Profile — extracted from page-templates/single-gymnast_profile.php inline <style> blocks (WS-2.6 Phase 1, 1A PR-7). */
/* Byte-identical carryover of 5 former inline blocks, in original document order; legacy hex preserved (cleaned in a separate WS-2.5 slice). */
/* The formerly coach-only and restricted-modal blocks are inert without their conditional markup (namespaced selectors; the one generic rule, */
/* .gp-video-card-thumbnail{position:relative}, duplicates css/gp-profile.css:899 and is a no-op). The locked-view doc keeps its own inline block. */

/* ===== block 1/5 — header bar (was lines 140-516, unconditional) ===== */
/* ========================================
   DESKTOP HEADER BAR - Black Design
   Hidden on mobile (gp-mobile-nav-system takes over)
   ======================================== */
.gp-profile-header-bar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #000;
    border-bottom: 1px solid #222;
}

.gp-profile-header-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
    position: relative;
}

.gp-profile-header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.gp-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    margin-left: -12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.gp-back-btn:hover {
    background: transparent;
    color: #d1d5db; /* light gray — subtle dim from white, no rectangular highlight */
}

/* Anchor variant of .gp-back-btn (v2.4.0+): server-side rendering
   means we use <a> with href, so undo default underline. */
a.gp-back-btn {
    text-decoration: none;
}

.gp-profile-header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.gp-profile-header-logo img {
    height: 46px;
    width: auto;
    display: block;
}

.gp-profile-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.gp-user-menu {
    position: relative;
}

.gp-user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 24px;
    transition: background 0.2s ease;
}

.gp-user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Kill the browser's default focus ring for MOUSE interaction (it painted a white/blue
   box around the avatar on the black header after a click — owner, 2026-07-14) while
   keeping a deliberate, visible ring for KEYBOARD users (a11y). */
.gp-user-menu-trigger:focus { outline: none; }
.gp-user-menu-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.gp-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.gp-chevron {
    color: #999;
    transition: transform 0.2s ease;
}

.gp-user-menu.open .gp-chevron {
    transform: rotate(180deg);
}

.gp-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.gp-user-menu.open .gp-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gp-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #333;
}

.gp-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.gp-dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.gp-dropdown-name {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gp-dropdown-email {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gp-user-dropdown-links {
    padding: 8px;
}

.gp-user-dropdown-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.gp-user-dropdown-links a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.gp-user-dropdown-links a svg {
    flex-shrink: 0;
    color: #888;
}

.gp-user-dropdown-links a:hover svg {
    color: #DFB859;
}

.gp-dropdown-divider {
    height: 1px;
    background: #333;
    margin: 8px 0;
}

.gp-logout-link {
    color: #e74c3c !important;
}

.gp-logout-link:hover {
    background: rgba(231, 76, 60, 0.1) !important;
}

.gp-logout-link svg {
    color: #e74c3c !important;
}

.gp-header-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #DFB859;
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
}

.gp-header-login-btn:hover {
    background: #c9a64d;
}

/* Admin Bar Adjustment */
.admin-bar .gp-profile-header-bar {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .gp-profile-header-bar {
        top: 0;
    }
}

/* ========================================
   TOUCH DEVICES: Hide desktop header, show mobile nav
   Mobile nav rendered by gp-mobile-nav-system.php
   ======================================== */
@media (max-width: 1024px) {
    .gp-profile-header-bar {
        display: none !important;
    }
    
    /* Body padding for mobile header from gp-mobile-nav-system */
    body.gp-app {
        padding-top: 0; /* Mobile nav system handles this */
    }
}

/* ============================================
   v2.4.0: Thumbnail Picker (Add/Edit Video modal)
   Text-status pattern — no image preview, just filename / status line.
   ============================================ */
.gp-thumbnail-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.gp-thumbnail-status {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gp-thumbnail-status-empty {
    color: #9ca3af;
}
.gp-thumbnail-status-filled {
    color: #1a1a1a;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
}
.gp-thumbnail-status-filled::before {
    content: "\2713"; /* check mark */
    color: #16a34a;
    flex-shrink: 0;
    font-weight: 700;
}
/* Small inline thumbnail. Only rendered by JS when an image is set —
   no empty <img> in initial markup, so Kadence's `img { display: block }`
   reset cannot create a broken-image icon. */
.gp-thumbnail-status-thumb {
    width: 80px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #f3f4f6;
}
.gp-thumbnail-status-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.gp-thumbnail-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.gp-thumbnail-choose-btn,
.gp-thumbnail-remove-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.gp-thumbnail-choose-btn:hover {
    background: rgba(223, 184, 89, 0.08);
    border-color: #DFB859;
    color: #1a1a1a;
}
.gp-thumbnail-choose-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}
.gp-thumbnail-remove-btn {
    color: #dc2626;
    border-color: #fecaca;
}
.gp-thumbnail-remove-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
}
@media (max-width: 480px) {
    .gp-thumbnail-picker {
        flex-direction: column;
        align-items: stretch;
    }
    .gp-thumbnail-actions {
        justify-content: flex-end;
    }
}

/* ===== block 2/5 — star button + video heart (was lines 1199-1380, coach/club-heart branch) ===== */
/* ============================================
   STAR BUTTON - Add to Recruiting Board
   ============================================ */
.gp-btn-star {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e4e6eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gp-btn-star svg {
    width: 20px;
    height: 20px;
    stroke: #9ca3af;
    fill: none;
    stroke-width: 2;
    transition: all 0.2s ease;
}

/* Hover state - shows intent */
.gp-btn-star:hover {
    background: #fffbeb;
    border-color: var(--accent-gold, #DFB859);
}

.gp-btn-star:hover svg {
    stroke: var(--accent-gold, #DFB859);
    fill: rgba(223, 184, 89, 0.3);
}

/* STARRED STATE - Gold background with white star */
.gp-btn-star.starred {
    background: var(--accent-gold, #DFB859);
    border-color: var(--accent-gold, #DFB859);
    color: #fff;
}

.gp-btn-star.starred svg {
    stroke: #fff;
    fill: #fff;
}

.gp-btn-star.starred:hover {
    background: #c9a24e;
    border-color: #c9a24e;
}

/* Loading state */
.gp-btn-star.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Message button on profile (coach view) */
.gp-profile-msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gp-profile-msg-btn:hover,
.gp-profile-msg-btn:focus {
    color: #007AFF;
    border-color: #007AFF;
    background: #EBF5FF;
}

/* Toast container for this page */
.gp-profile-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gp-profile-toast {
    background: #1f2937;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gp-profile-toast.success {
    background: #059669;
}

.gp-profile-toast.error {
    background: #dc2626;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============================================
   VIDEO HEART / LIKE (coaches) — mirrors the Scout Directory heart.
   Overlay on the thumbnail; shares the gp_toggle_like backend so a like
   here also shows hearted in Scout. Pure action: no count, no who-liked
   (likes stay private coach <-> gymnast).
   ============================================ */
.gp-video-card-thumbnail {
    position: relative; /* anchor the heart overlay (badges/score already rely on this) */
}
.gp-video-heart {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 6; /* above the play overlay (z-index 5), badges and score (z-index 2) */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.gp-video-heart .heart-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #9ca3af;
    stroke-width: 2;
    transition: fill 0.15s ease, stroke 0.15s ease, transform 0.15s ease;
}
.gp-video-heart:hover { border-color: #FF3B30; }
.gp-video-heart:hover .heart-icon { stroke: #FF3B30; }
.gp-video-heart.is-hearted { border-color: #FF3B30; }
.gp-video-heart.is-hearted .heart-icon {
    fill: #FF3B30;
    stroke: none;
    animation: gp-heart-pop 0.2s ease-out;
}
@keyframes gp-heart-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== block 3/5 — access-restricted modal sizing (was lines 2877-2881, no-contact branch) ===== */
.gp-modal-small {
    max-width: 420px;
}

/* ===== block 4/5 — video modal header (was lines 3228-3328, unconditional) ===== */
/* Video modal header - slim bar above the video */
.gp-video-modal-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 12px;
    background: #1a1a1a;
}
.gp-video-modal .gp-video-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.gp-video-modal .gp-video-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.gp-video-modal .gp-video-modal-close svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
/* Tap to unmute overlay - mobile only */
.gp-tap-to-unmute {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    animation: gpUnmutePulse 2s ease-in-out infinite;
}
.gp-unmute-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.gp-unmute-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
@keyframes gpUnmutePulse {
    0%, 100% { 
        opacity: 1; 
        transform: translateX(-50%) scale(1); 
    }
    50% { 
        opacity: 0.8; 
        transform: translateX(-50%) scale(1.05); 
    }
}
/* Video modal loading state */
.gp-video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #fff;
    background: #1a1a1a;
    aspect-ratio: 16/9;
}
.gp-video-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #DFB859;
    border-radius: 50%;
    animation: gpSpin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes gpSpin {
    to { transform: rotate(360deg); }
}
/* Presto Player container styling */
.gp-video-modal-player .presto-player__wrapper,
.gp-video-modal-player .presto-player {
    width: 100% !important;
    max-width: 100% !important;
}

/* ===== block 5/5 — footer (was lines 3350-3441, unconditional) ===== */
/* ========================================
   FOOTER STYLES
   ======================================== */
.gp-custom-footer {
    background: #000;
    color: #fff;
    padding: 20px 0;
    margin-top: 0;
}

.gp-footer-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gp-footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gp-footer-logo img {
    height: 28px;
    width: auto;
    display: block;
}

.gp-footer-copyright {
    font-size: 13px;
    color: #888;
}

.gp-footer-right {
    display: flex;
    gap: 24px;
}

.gp-footer-right a {
    color: #888;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.gp-footer-right a:hover {
    color: #DFB859;
}

@media (max-width: 1024px) {
    .gp-custom-footer {
        padding: 16px 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
    
    .gp-footer-container {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 0 16px;
    }
    
    .gp-footer-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .gp-footer-right {
        gap: 20px;
    }
    
    .gp-footer-copyright {
        font-size: 12px;
    }
    
    .gp-footer-right a {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .gp-footer-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

/* ==========================================================================
   DARK MODE (Podium design pass, UB 2026-07-25) — this file had zero
   [data-theme="dark"] rules; every color above is a literal light-mode hex
   (byte-identical carryover, per the file's own header comment), so nothing
   here changes light. The profile header bar itself (block 1/5, top of file)
   is deliberately theme-invariant (always-black chrome) and stays untouched.
   Light is untouched everywhere below: none of this exists outside
   [data-theme="dark"]. */

/* "Add to Board" star button — was a plain white card (bg #fff, border/ink
   gray) with no dark rule, so it read as a stray light chip on a dark panel.
   Buttons work item: secondary/ghost actions go dark-neutral (panel-2 + ink +
   hairline), not gold — gold is reserved for the primary/starred state. */
[data-theme="dark"] .gp-btn-star {
    background: var(--gp-color-surface-2);
    border-color: var(--gp-color-border);
    color: var(--gp-color-text);
}
[data-theme="dark"] .gp-btn-star svg {
    stroke: var(--gp-color-text-muted);
}
[data-theme="dark"] .gp-btn-star:hover {
    background: var(--gp-color-border);
    border-color: var(--gp-color-primary);
}
[data-theme="dark"] .gp-btn-star:hover svg {
    stroke: var(--gp-color-primary);
    fill: none; /* light's hover uses a translucent gold fill; the standing no-mist-gold rule rules that out for dark, so this stays a solid stroke only */
}

/* Starred state — already gold-filled in both themes (byte-identical
   background), but the ink/icon on top of that gold fill was hardcoded white
   in both themes too. Owner override A: gold-filled controls take the app's
   dark action-ink (#1b1306), never white-on-gold, in dark. */
[data-theme="dark"] .gp-btn-star.starred {
    color: var(--gp-color-on-primary);
}
[data-theme="dark"] .gp-btn-star.starred svg {
    stroke: var(--gp-color-on-primary);
    fill: var(--gp-color-on-primary);
}

/* Message button hover/focus — was a hardcoded light-blue wash (#007AFF ink/
   border, #EBF5FF fill). Accent discipline: this is a genuine action (not a
   decorative link), so it goes gold in dark; the fill stays a neutral panel-2
   wash rather than a pale gold tint (no-mist-gold — gold is solid or nothing). */
[data-theme="dark"] .gp-profile-msg-btn:hover,
[data-theme="dark"] .gp-profile-msg-btn:focus {
    color: var(--gp-color-primary);
    border-color: var(--gp-color-primary);
    background: var(--gp-color-surface-2);
}
