/* Map Popup Styles */
/* Extracted from inline styles in map-page.js */

/* Country Popup Styles */
.country-popup {
    padding: 0.75rem;
    color: var(--color-chalk);
    min-width: 180px;
    max-width: 250px;
}

.country-popup-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-pitch);
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(63, 243, 132, 0.2);
}

.country-popup-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.3rem 0;
    font-size: 0.8rem;
}

.stat-label {
    opacity: 0.7;
    font-size: 0.75rem;
}

.stat-value {
    font-weight: 500;
    text-align: right;
    font-size: 0.8rem;
}

.stat-value.highlight {
    color: var(--color-pitch);
}

/* Club Popup Container */
.club-popup-container {
    position: fixed;
    z-index: 10001;
    display: none;
}

/* Simple Club Popup (Hover) */
.club-popup-simple {
    /* Background is set dynamically inline based on club colors */
    border: 1px solid rgba(79, 172, 254, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    padding: 0.75rem;
    min-width: 220px;
    max-width: 280px;
    border-radius: 8px;
    font-size: 0.875rem;
}

.club-popup-simple.dark-club {
    /* Background is set dynamically inline */
    border-color: rgba(100, 100, 110, 0.6);
    box-shadow: 0 0 20px rgba(100, 100, 110, 0.3);
}

.club-popup-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.club-popup-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.club-popup-name {
    color: var(--color-chalk);
    font-weight: 600;
    font-size: 0.95rem;
}

.club-popup-stadium {
    color: rgba(232, 241, 249, 0.8);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.club-popup-hint {
    color: rgba(79, 172, 254, 0.9);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Detailed Club Popup (Click) */
.club-popup-detailed {
    padding: 0;
    min-width: 280px;
    max-width: 320px;
    border-radius: 8px;
    font-size: 0.8rem;
    overflow: hidden;
}

.club-popup-detailed-header {
    background: rgba(79, 172, 254, 0.8);
    padding: 0.6rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.club-popup-detailed-header.dark-header {
    background: rgba(60, 60, 70, 0.8);
}

.club-popup-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.club-popup-link:hover {
    opacity: 0.8;
}

.club-popup-detailed-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.club-popup-detailed-logo.light-logo {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.club-popup-detailed-name {
    color: var(--color-chalk);
    font-weight: 600;
    font-size: 0.95rem;
}

.club-popup-detailed-name.light-text {
    color: var(--color-navy);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.club-popup-close {
    background: none;
    border: none;
    color: var(--color-chalk);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.club-popup-close:hover {
    opacity: 1;
}

.club-popup-close.light-close {
    color: var(--color-navy);
}

/* Popup Body Content */
.club-popup-body {
    padding: 0.75rem;
}

.club-popup-section {
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(79, 172, 254, 0.2);
}

.club-popup-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.club-popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.club-popup-row:last-child {
    margin-bottom: 0;
}

.club-popup-label {
    color: var(--color-chalk);
    opacity: 0.8;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.club-popup-sublabel {
    color: rgba(232, 241, 249, 0.6);
    font-size: 0.75rem;
}

.club-popup-value {
    color: var(--color-chalk);
    font-size: 0.8rem;
}

.club-popup-value.highlight-green {
    color: var(--color-pitch);
    font-weight: 500;
}

.club-popup-value.no-data {
    color: rgba(232, 241, 249, 0.5);
}

/* Manager Link */
.club-manager-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.club-manager-link:hover {
    opacity: 0.7;
}

.club-manager-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.club-manager-name {
    color: var(--color-chalk);
    font-size: 0.8rem;
}

/* League Link */
.club-league-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.club-league-link:hover {
    opacity: 0.7;
}

.club-league-logo {
    width: 16px;
    height: 16px;
}

.club-league-name {
    color: var(--color-chalk);
    font-size: 0.8rem;
}

/* Form Display */
.club-form-display {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 0.75rem;
}

.club-form-letter {
    font-weight: 600;
    margin: 0 1px;
}

.club-form-win {
    color: var(--color-pitch);
}

.club-form-draw {
    color: #FFA500;
}

.club-form-loss {
    color: #FF6B6B;
}

/* Stadium Image */
.club-stadium-image {
    margin: 0.4rem 0;
}

.club-stadium-image img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

/* Footer Link */
.club-popup-footer {
    padding-top: 0.6rem;
    border-top: 1px solid rgba(79, 172, 254, 0.2);
}

.club-popup-view-link {
    display: block;
    text-align: center;
    color: #4FACFE;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 4px;
    transition: background 0.2s;
}

.club-popup-view-link:hover {
    background: rgba(79, 172, 254, 0.2);
}

/* Loading State */
.club-popup-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-chalk);
}

.club-popup-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-top-color: #4FACFE;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.club-popup-loading-text {
    font-size: 0.875rem;
}

/* Error State */
.club-popup-error {
    background: rgba(10, 11, 20, 0.95);
    padding: 0.75rem;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.club-popup-error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.club-popup-error-title {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 0.875rem;
}

.club-popup-error-message {
    color: rgba(232, 241, 249, 0.8);
    font-size: 0.8rem;
}

/* Mobile Close Button */
.popup-close-mobile {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-pitch);
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

/* Cluster Label */
.cluster-label {
    color: white;
    font-weight: bold;
    font-size: 11px;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Custom Tooltip */
#customTooltip {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    display: none;
    background: rgba(10, 11, 20, 0.95);
    border: 1px solid rgba(63, 243, 132, 0.3);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Mobile Centered Popup */
.club-popup-container.mobile-centered {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
    position: fixed;
    z-index: 10001;
}