/* Dynasty Nerds Player Entity Hover Cards */

/* ── Elementor / Hello theme overrides ── */
.dnpe-tooltip {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.dnpe-tooltip p {
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.dnpe-tooltip a,
.dnpe-tooltip a:hover,
.dnpe-tooltip a:active,
.dnpe-tooltip a:visited,
.dnpe-tooltip a:focus {
    text-decoration: none !important;
    outline: none !important;
    color: inherit !important;
}

/* Kill Hello Elementor button reset (border, bg, padding, color) */
.dnpe-tooltip button,
.dnpe-tooltip button:hover,
.dnpe-tooltip button:focus,
.dnpe-tooltip button:active,
.dnpe-tooltip button:focus:not(:focus-visible),
.dnpe-tooltip button:not(:disabled) {
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    border-color: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
    width: auto !important;
    text-align: left !important;
}

.dnpe-tooltip img {
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
}

/* ── Inline player tag ── */
.dnpe-player {
    background-color: rgba(178, 21, 13, 0.06);
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.dnpe-player:hover,
.dnpe-player:focus {
    background-color: rgba(178, 21, 13, 0.14);
    outline: none;
}

.dnpe-player::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 1px;
    vertical-align: 1px;
    border-radius: 3px;
    opacity: 0.6;
    transition: opacity 0.15s ease;
    background-image: var(--dnpe-icon);
    background-size: cover;
}

.dnpe-player:hover::after {
    opacity: 1;
}

/* ── First-visit pulse on player tag ── */
.dnpe-player-pulse {
    animation: dnpe-tag-pulse 1.5s ease-in-out 3;
}

@keyframes dnpe-tag-pulse {
    0%, 100% { background-color: rgba(178, 21, 13, 0.06); box-shadow: 0 0 0 0 rgba(178, 21, 13, 0); }
    50% { background-color: rgba(178, 21, 13, 0.18); box-shadow: 0 0 0 4px rgba(178, 21, 13, 0.12); }
}

/* ── First-visit nudge tooltip ── */
.dnpe-nudge {
    position: absolute;
    z-index: 999997;
    background: #1a2f4a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    opacity: 0;
    animation: dnpe-nudge-in 0.3s ease forwards 0.1s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dnpe-nudge-hiding {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}

@keyframes dnpe-nudge-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dnpe-nudge-arrow {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #1a2f4a;
}

.dnpe-nudge-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Player card ── */
.dnpe-tooltip {
    position: fixed;
    z-index: 999999;
    width: 360px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

.dnpe-tooltip.dnpe-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Two-tone split header (matches dynasty rankings modal hero) ── */
.dnpe-app-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 16px 16px 16px calc(16.67% + 48px) !important;
    border-radius: 12px 12px 0 0 !important;
    position: relative !important;
    overflow: visible !important;
    min-height: 130px !important;
    background: linear-gradient(180deg, #FFFFFF 0%, #EEF3F8 100%) !important;
}

/* Left team-color strip */
.dnpe-app-header-bg-left {
    position: absolute !important;
    top: -1px !important;
    left: 0 !important;
    width: 16.67% !important;
    bottom: -1px !important;
    z-index: 0 !important;
}

/* Accent stripe centered on strip edge */
.dnpe-app-header-bg-stripe {
    position: absolute !important;
    top: -1px !important;
    left: calc(16.67% - 5px) !important;
    width: 10px !important;
    bottom: -1px !important;
    z-index: 1 !important;
}

/* Jersey number on team color strip */
.dnpe-app-jersey {
    position: absolute !important;
    top: -4px !important;
    left: 0 !important;
    width: 16.67% !important;
    font-size: 36px !important;
    font-weight: 500 !important;
    font-family: 'Teko', sans-serif !important;
    text-align: center !important;
    letter-spacing: 0.05em !important;
    line-height: 52px !important;
    z-index: 2 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Headshot centered on the stripe */
.dnpe-app-headshot {
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    background: #FFFFFF !important;
    flex-shrink: 0 !important;
    border: 1px solid #f0f0f0 !important;
    z-index: 2 !important;
    position: absolute !important;
    left: calc(16.67% - 29px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Info section on the light side */
.dnpe-app-info {
    flex: 1 !important;
    min-width: 0 !important;
    z-index: 2 !important;
    position: relative !important;
}

.dnpe-app-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 2px !important;
    flex-wrap: wrap !important;
}

.dnpe-app-name {
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 30px !important;
    color: #343434 !important;
    font-family: 'Source Sans Pro', sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dnpe-app-meta {
    font-size: 15px !important;
    font-family: 'Teko', sans-serif !important;
    font-weight: 400 !important;
    line-height: 21px !important;
    letter-spacing: 0.05em !important;
    color: #343434 !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Combined Team+Position Badge ── */
.dnpe-combo-badge {
    display: inline-flex !important;
    align-items: stretch !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    height: 22px !important;
}

.dnpe-combo-team {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 6px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    min-width: 36px !important;
}

.dnpe-combo-divider {
    width: 3px !important;
    flex-shrink: 0 !important;
}

.dnpe-combo-pos {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 6px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    min-width: 30px !important;
}

/* ── News snippet (injury/status) ── */
.dnpe-card-news {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    max-width: fit-content;
}

.dnpe-card-news-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: dnpe-pulse 2s ease-in-out infinite;
}

.dnpe-dot-green { background: #4ade80; box-shadow: 0 0 4px rgba(74, 222, 128, 0.5); }
.dnpe-dot-yellow { background: #fbbf24; box-shadow: 0 0 4px rgba(251, 191, 36, 0.5); }
.dnpe-dot-red { background: #ef4444; box-shadow: 0 0 4px rgba(239, 68, 68, 0.5); }

@keyframes dnpe-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.dnpe-card-news-text {
    font-size: 10px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ── Go Premium CTA card (non-premium body) ── */
.dnpe-premium-cta {
    margin: 16px 16px 8px !important;
    padding: 0 !important;
}

.dnpe-premium-cta-inner {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px 16px !important;
    text-align: center !important;
}

.dnpe-premium-cta-title {
    font-family: 'Teko', sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1a2f4a !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    text-transform: uppercase !important;
}

.dnpe-premium-cta-desc {
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
}

/* ── Card body ── */
.dnpe-card-body {
    max-height: 320px;
    overflow-y: auto;
}

.dnpe-card-tab-content {
    min-height: 100px;
    opacity: 1;
    transition: opacity 0.12s ease;
}

.dnpe-card-tab-content.dnpe-tab-fading {
    opacity: 0;
}

/* ── Overview stats row ── */
.dnpe-card-overview {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.dnpe-card-stat {
    padding: 12px 8px !important;
    text-align: center !important;
    border-right: 1px solid #f0f0f0 !important;
}

.dnpe-card-stat:last-child {
    border-right: none !important;
}

.dnpe-card-stat-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #9ca3af !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 4px 0 !important;
}

.dnpe-card-stat-value {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1a2f4a !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.dnpe-card-stat-sub {
    font-size: 10px !important;
    color: #9ca3af !important;
    margin: 3px 0 0 0 !important;
}

/* ── Roster % bar ── */
.dnpe-card-roster-pct {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.dnpe-card-roster-pct-label {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.dnpe-card-roster-pct-bar-track {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.dnpe-card-roster-pct-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #2d8a4e, #4ade80);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.dnpe-card-roster-pct-value {
    font-size: 12px;
    font-weight: 800;
    color: #1a2f4a;
    flex-shrink: 0;
    min-width: 32px;
    text-align: right;
}

/* ── Bio ── */
.dnpe-card-bio {
    padding: 12px 16px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #4b5563 !important;
    margin: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ── Blurred teaser sections ── */
.dnpe-card-teaser {
    padding: 14px 16px !important;
    position: relative !important;
}

.dnpe-card-teaser-label {
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.dnpe-card-teaser-blur {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
}

/* Grid teaser items (Stats tab) */
.dnpe-card-teaser-item {
    background: #f9fafb;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.dnpe-card-teaser-item-label {
    font-size: 9px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    margin: 0 0 2px 0;
}

.dnpe-card-teaser-item-value {
    font-size: 16px;
    font-weight: 800;
    color: #1a2f4a;
    margin: 0;
}

.dnpe-card-teaser-item-sub {
    font-size: 9px;
    color: #9ca3af;
    margin: 2px 0 0 0;
}

/* Row teaser items (Rankings tab) */
.dnpe-card-teaser-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 4px;
}

.dnpe-card-teaser-ranker {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.dnpe-card-teaser-rank-val {
    font-size: 13px;
    font-weight: 800;
    color: #1a2f4a;
}

/* Lock overlay */
.dnpe-card-teaser-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.dnpe-card-teaser-lock {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1a2f4a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dnpe-card-teaser-lock svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.dnpe-card-teaser-lock:hover {
    background: #B2150D;
    color: #fff;
}

/* ── Trends tab: bar chart ── */
.dnpe-trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    padding: 0 4px;
}

.dnpe-trend-bar {
    flex: 1;
    background: linear-gradient(to top, #B2150D, #e8453d);
    border-radius: 3px 3px 0 0;
    min-width: 0;
}

.dnpe-trend-labels {
    display: flex;
    justify-content: space-between;
    padding: 4px 4px 0;
    font-size: 9px;
    color: #9ca3af;
}

/* ── Leagues tab ── */
.dnpe-card-league-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dnpe-card-league-item {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.dnpe-card-league-title {
    font-size: 14px;
    font-weight: 700;
    color: #166534;
    margin: 0 0 4px 0;
}

.dnpe-card-league-sub {
    font-size: 12px;
    color: #4ade80;
    margin: 0;
    line-height: 1.4;
}

/* ── CTA footer ── */
.dnpe-card-footer {
    padding: 12px 16px !important;
    border-top: 1px solid #f0f0f0 !important;
}

.dnpe-card-cta {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
}

.dnpe-card-cta-primary,
a.dnpe-card-cta-primary {
    background: #B2150D !important;
    color: #fff !important;
}

.dnpe-card-cta-primary:hover,
a.dnpe-card-cta-primary:hover {
    background: #931109 !important;
    color: #fff !important;
}

/* ── Mobile centered modal ── */
@media (max-width: 768px) {
    .dnpe-tooltip {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        right: auto;
        bottom: auto;
        width: calc(100% - 32px);
        max-width: 360px;
        max-height: 85vh;
        transform: translate(-50%, -50%) scale(0.95);
        border-radius: 12px;
        overflow-y: auto;
    }

    .dnpe-tooltip.dnpe-visible {
        transform: translate(-50%, -50%) scale(1);
    }

    .dnpe-card-body {
        max-height: none;
    }
}

.dnpe-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dnpe-overlay.dnpe-visible {
    opacity: 1;
    visibility: visible;
}
