/* Diplomania - Custom Styles */

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #060d18;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Leaflet map customization */
.leaflet-container {
    background: #1a3a5c;
    font-family: inherit;
}

.leaflet-control-zoom {
    display: none;
}

.leaflet-control-attribution {
    display: none !important;
}

/* Country styles */
.leaflet-interactive {
    transition: fill-opacity 0.2s ease, stroke-width 0.2s ease, stroke 0.2s ease;
}

.leaflet-interactive:hover {
    fill-opacity: 0.5 !important;
}

/* Country labels */
.country-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff;
    font-weight: 700;
    text-shadow:
        -2px -2px 0 rgba(0,0,0,0.9),
        2px -2px 0 rgba(0,0,0,0.9),
        -2px 2px 0 rgba(0,0,0,0.9),
        2px 2px 0 rgba(0,0,0,0.9),
        0 0 8px rgba(0,0,0,1),
        0 0 15px rgba(0,0,0,0.8);
    white-space: nowrap;
    pointer-events: none !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.country-label span {
    display: inline-block;
}

.country-label-small {
    font-size: 8px;
}

.country-label-medium {
    font-size: 11px;
}

.country-label-large {
    font-size: 14px;
}

.country-label-xlarge {
    font-size: 18px;
}

/* Leaflet tooltip override */
.leaflet-tooltip {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    padding: 6px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

.leaflet-tooltip::before {
    display: none;
}

/* Panel transitions */
.panel-open {
    transform: translateX(0) !important;
}

/* Chat message styles */
.chat-message {
    max-width: 85%;
    animation: message-in 0.3s ease;
}

.chat-message.player {
    margin-left: auto;
    background-color: #1d9bf0;
}

.chat-message.ai {
    margin-right: auto;
    background-color: #374151;
}

@keyframes message-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #6b7280;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Country list item */
.country-list-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.country-list-item:hover {
    background-color: #1f2937;
}

.country-list-item.selected {
    background-color: #1d9bf0;
    border-color: #1d9bf0;
}

/* Button pulse for action button */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(234, 179, 8, 0.6);
    }
}

#action-btn {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* War zone pulsing */
@keyframes war-pulse {
    0%, 100% {
        fill-opacity: 0.6;
    }
    50% {
        fill-opacity: 0.3;
    }
}

.war-zone {
    animation: war-pulse 1.5s ease-in-out infinite;
}

/* Player country glow */
.player-country {
    filter: drop-shadow(0 0 8px rgba(0, 186, 124, 0.5));
}

/* Relation badges */
.relation-badge {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.relation-badge.ally {
    background-color: rgba(0, 186, 124, 0.2);
    color: #00ba7c;
}

.relation-badge.neutral {
    background-color: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.relation-badge.enemy {
    background-color: rgba(255, 173, 31, 0.2);
    color: #ffad1f;
}

.relation-badge.war {
    background-color: rgba(244, 33, 46, 0.2);
    color: #f4212e;
}

/* News item styles */
.news-item {
    animation: news-in 0.3s ease;
}

@keyframes news-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    #side-panel, #menu-panel {
        width: 100%;
    }

    .country-label-xlarge {
        font-size: 14px;
    }

    .country-label-large {
        font-size: 11px;
    }
}
