/* Emergency Dashboard Styles */

.emergency-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.emergency-dashboard *,
.emergency-dashboard *::before,
.emergency-dashboard *::after {
    box-sizing: border-box;
}

.emergency-dashboard__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
    max-width: 100%;
}

.emergency-dashboard__card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    backdrop-filter: blur(10px);
}

/* Левая колонка */
.emergency-dashboard__left {
    display: flex;
    flex-direction: column;
}

.emergency-dashboard__left .emergency-dashboard__card {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Правая колонка */
.emergency-dashboard__right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.emergency-dashboard__right .emergency-dashboard__details {
    flex: 1;
}

.emergency-dashboard__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.emergency-dashboard__subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px 0;
}

.emergency-dashboard__mini-map {
    margin: 0 0 24px 0;
}

.emergency-dashboard__mini-map-placeholder {
    height: 200px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    border: 2px dashed #d1d5db;
}

.emergency-dashboard__stats {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 0;
    border: none;
    margin: 0 0 20px 0;
}

.emergency-dashboard__stats-card .emergency-dashboard__stats {
    margin-bottom: 20px;
}

.emergency-dashboard__stat {
    flex: 1;
    text-align: center;
}

.emergency-dashboard__stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 2px;
}

.emergency-dashboard__stat-unit {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin-bottom: 4px;
}

.emergency-dashboard__stat-label {
    font-size: 14px;
    color: #6b7280;
}

.emergency-dashboard__action {
    margin-top: 20px;
}

.emergency-dashboard__action--dual {
    display: flex;
    gap: 12px;
}

.emergency-dashboard__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 12px 20px;
    background: #216f43;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.emergency-dashboard__button-icon {
    font-size: 16px;
}

.emergency-dashboard__button--world {
    background: #216f43;
}

.emergency-dashboard__button--world:hover {
    background: #4a7b5f;
    color: #ffffff;
}

.emergency-dashboard__button--kz {
    background: #00afca;
}

.emergency-dashboard__button--kz:hover {
    background: #008fa6;
    color: #ffffff;
}

.emergency-dashboard__button--secondary {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.emergency-dashboard__button--secondary:hover {
    background: #f9fafb;
    color: #1f2937;
}

/* Центральная колонка */
.emergency-dashboard__section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #1f2937;
}

.emergency-dashboard__events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 8px;
}

.emergency-dashboard__events-list::-webkit-scrollbar {
    width: 6px;
}

.emergency-dashboard__events-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.emergency-dashboard__events-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.emergency-dashboard__events-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.emergency-dashboard__event-item {
    padding: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.emergency-dashboard__event-item:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.emergency-dashboard__event-item.is-active {
    background: rgba(239, 246, 255, 0.9);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.emergency-dashboard__event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.emergency-dashboard__event-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
    flex: 1;
    margin-right: 12px;
}

.emergency-dashboard__event-date {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

.emergency-dashboard__event-meta {
    margin-bottom: 8px;
}

.emergency-dashboard__event-country {
    font-size: 13px;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.emergency-dashboard__event-country .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.emergency-dashboard__event-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.emergency-dashboard__badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

/* Stage badges */
.emergency-dashboard__badge--stage-1 {
    background: #fef3c7;
    color: #92400e;
}

.emergency-dashboard__badge--stage-2 {
    background: #dbeafe;
    color: #1e40af;
}

/* Status badges */
.emergency-dashboard__badge--status-1 {
    background: #d1fae5;
    color: #065f46;
}

.emergency-dashboard__badge--status-2 {
    background: #f3f4f6;
    color: #374151;
}

/* Risk level badges */
.emergency-dashboard__badge--risk-1 {
    background: #d1fae5;
    color: #065f46;
}

.emergency-dashboard__badge--risk-2 {
    background: #fef3c7;
    color: #92400e;
}

.emergency-dashboard__badge--risk-3 {
    background: #fed7aa;
    color: #9a3412;
}

.emergency-dashboard__badge--risk-4 {
    background: #fecaca;
    color: #991b1b;
}

.emergency-dashboard__more {
    text-align: center;
    margin-top: 20px;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
}

.emergency-dashboard__more-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.emergency-dashboard__more-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Правая колонка - детали */
.emergency-dashboard__details {
    position: sticky;
    top: 0;
}

.emergency-dashboard__stats-card {
    padding: 24px;
}

.emergency-dashboard__details-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #111827;
    line-height: 1.3;
}

.emergency-dashboard__details-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
    font-weight: 400;
}

.emergency-dashboard__details-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.emergency-dashboard__details-section {
    margin-bottom: 20px;
}

.emergency-dashboard__details-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.emergency-dashboard__details-section > div {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.6;
}

.emergency-dashboard__details-description {
    color: #374151;
    line-height: 1.6;
}

.emergency-dashboard__details-outcome {
    padding: 12px;
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #1e40af;
}

.emergency-dashboard__details-action {
    margin-top: 24px;
}

.emergency-dashboard__empty {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

/* Адаптив */

@media (max-width: 992px) {
    .emergency-dashboard {
        padding: 16px;
    }
    
    .emergency-dashboard__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .emergency-dashboard__details {
        position: static;
    }
    
    .emergency-dashboard__stats {
        flex-direction: row;
        gap: 16px;
    }
    
    .emergency-dashboard__stat {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .emergency-dashboard {
        padding: 12px;
    }
    
    .emergency-dashboard__grid {
        gap: 12px;
    }
    
    .emergency-dashboard__card {
        padding: 16px;
    }
    
    .emergency-dashboard__mini-map {
        height: 160px;
    }
    
    .emergency-dashboard__events-list {
        max-height: 300px;
    }
    
    .emergency-dashboard__button-icon {
        display: none;
    }
}

/* Баннер Топ-10 стран */
.emergency-dashboard__top-banner {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 6;
    margin-top: 24px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.emergency-dashboard__top-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.emergency-dashboard__top-banner-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.emergency-dashboard__top-banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.emergency-dashboard__top-banner-text {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.emergency-dashboard__top-banner-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: #333;
    animation: bounce-arrow 2s infinite;
}

.emergency-dashboard__top-banner-arrow svg {
    width: 24px;
    height: 24px;
}

.emergency-dashboard__top-banner:hover .emergency-dashboard__top-banner-arrow {
    background: #ffffff;
}

@keyframes bounce-arrow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(5px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    .emergency-dashboard__top-banner {
        aspect-ratio: 16 / 8;
        margin-top: 16px;
    }
    
    .emergency-dashboard__top-banner-text {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    .emergency-dashboard__top-banner-content {
        bottom: 12px;
        right: 16px;
        gap: 8px;
    }
    
    .emergency-dashboard__top-banner-arrow {
        width: 28px;
        height: 28px;
    }
    
    .emergency-dashboard__top-banner-arrow svg {
        width: 16px;
        height: 16px;
    }
}