/* Mission Summary Modal - Dark sci-fi military, glassmorphism, neon accents */
.mission-summary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
    box-sizing: border-box;
}

.mission-summary-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mission-summary-content {
    font-family: var(--font-ui);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.95) 0%, rgba(8, 12, 24, 0.98) 50%);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.7),
        0 0 48px rgba(34, 197, 94, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    width: 100%;
    max-width: 440px;
    max-height: 95vh;
    max-height: 95dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: missionSummarySlideIn 0.35s ease-out;
}

@keyframes missionSummarySlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Header: glowing green MISSION DISPATCHED --- */
.mission-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.18) 0%, rgba(34, 197, 94, 0.06) 100%);
    border-bottom: 1px solid rgba(34, 197, 94, 0.3);
    flex-shrink: 0;
}

.mission-summary-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    color: #86efac;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-ui);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.6), 0 0 40px rgba(34, 197, 94, 0.3);
}

.mission-summary-close {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.mission-summary-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* --- Body --- */
.mission-summary-body {
    padding: 1rem 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* --- Status block: ON ROUTE + tactical --- */
.mission-summary-status-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 0.75rem;
    margin-bottom: 1rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.mission-summary-status-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.mission-summary-status-icon {
    font-size: 1.5rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

.mission-summary-status-icon-alt {
    opacity: 0.9;
}

.mission-summary-status-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.mission-summary-status-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-ui);
}

.mission-summary-status-sublabel {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0.5px;
}

/* --- Section titles --- */
.mission-summary-section {
    margin-bottom: 1rem;
}

.mission-summary-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-family: var(--font-ui);
}

/* --- Unit chips row --- */
.mission-summary-units-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.mission-summary-unit-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    backdrop-filter: blur(6px);
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
}

.mission-summary-unit-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.mission-summary-unit-qty {
    color: #60a5fa;
}

.mission-summary-unit-tier {
    color: #94a3b8;
    font-size: 0.7rem;
}

.mission-summary-general-chip {
    border-color: rgba(168, 85, 247, 0.35);
    background: rgba(88, 28, 135, 0.2);
}

.mission-summary-general-icon {
    font-size: 1rem;
}

.mission-summary-general-name {
    font-size: 0.75rem;
    color: #e9d5ff;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Mission details grid --- */
.mission-summary-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mission-summary-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: rgba(30, 41, 59, 0.35);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.mission-summary-detail-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.mission-summary-detail-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
}

/* --- Expected arrival --- */
.mission-summary-arrival {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    margin-top: 1rem;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
}

.mission-summary-arrival-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6ee7b7;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-ui);
}

.mission-summary-arrival-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #a7f3d0;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

/* --- Footer: VIEW ON MAP (glowing blue) + CLOSE --- */
.mission-summary-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.mission-summary-btn-primary {
    flex: 1;
    max-width: 220px;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    color: #0f172a;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 4px 14px rgba(59, 130, 246, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mission-summary-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.6), 0 6px 20px rgba(59, 130, 246, 0.4);
}

.mission-summary-btn-primary:active {
    transform: translateY(0);
}

.mission-summary-btn-secondary {
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #94a3b8;
    transition: all 0.2s;
}

.mission-summary-btn-secondary:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: #94a3b8;
    color: #e2e8f0;
}

@media (max-width: 480px) {
    .mission-summary-content {
        max-width: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }

    .mission-summary-units-row {
        justify-content: center;
    }

    .mission-summary-btn-primary {
        max-width: none;
    }
}
