/* src/styles/MissionConfig.css */
/* Professional Drone Swarm Management Interface */

@import './DesignTokens.css';

/* Mission Config Container */
.mission-config-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
    padding: var(--spacing-lg);
    font-family: var(--font-family-primary);
    color: var(--color-text-primary);
}

/* Page Header */
.mission-config-container h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xl);
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary), #00a8cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Origin Warning */
.origin-warning {
    background: linear-gradient(135deg, var(--color-warning-light), rgba(255, 193, 7, 0.05));
    border: 1px solid var(--color-warning-border);
    border-left: 4px solid var(--color-warning);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-base);
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-dark-base);
}

.origin-warning p {
    margin: 0;
    color: var(--color-warning-text);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
}

/* Heading Slider Section */
.heading-controls {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-dark-base);
}

.heading-controls label {
    display: block;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.heading-controls input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: var(--border-radius-full);
    background: var(--color-bg-tertiary);
    outline: none;
    margin: var(--spacing-sm) 0;
}

.heading-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 212, 255, 0.3);
}

.heading-controls button {
    background: var(--color-primary);
    color: var(--color-primary-text);
    border: none;
    border-radius: var(--border-radius-base);
    padding: var(--spacing-sm) var(--spacing-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-base);
    margin-left: var(--spacing-base);
}

.heading-controls button:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* Content Layout - Flexible Grid System */
.content-flex {
    display: grid;
    grid-template-columns: minmax(500px, 1fr) minmax(600px, 1.5fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
    align-items: start;
}

/* Drone Cards Panel - No Internal Scrolling */
.drone-cards {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-dark-lg);
    /* Removed overflow-y and max-height for better UX */
}

/* Removed scrollbar styles as no longer needed */

/* Plot Panel */
.initial-launch-plot {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-dark-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-base);
}

/* Empty State */
.drone-cards p {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    margin: var(--spacing-2xl) 0;
    padding: var(--spacing-xl);
    background: var(--color-bg-tertiary);
    border-radius: var(--border-radius-md);
    border: 2px dashed var(--color-border-secondary);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .content-flex {
        grid-template-columns: minmax(450px, 1fr) minmax(550px, 1.5fr);
        gap: var(--spacing-lg);
    }
}

@media (max-width: 1200px) {
    .content-flex {
        grid-template-columns: minmax(400px, 1fr) minmax(500px, 1.3fr);
        gap: var(--spacing-base);
    }
}

@media (max-width: 1024px) {
    .content-flex {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .mission-config-container {
        padding: var(--spacing-lg);
    }

    .drone-cards {
        padding: var(--spacing-lg);
    }

    .initial-launch-plot {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .mission-config-container {
        padding: var(--spacing-base);
    }

    .mission-config-container h2 {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-lg);
    }

    .drone-stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        padding: var(--spacing-base);
    }

    .heading-controls {
        padding: var(--spacing-base);
    }

    .heading-controls button {
        margin-left: 0;
        margin-top: var(--spacing-sm);
        width: 100%;
    }

    .drone-cards {
        padding: var(--spacing-base);
    }

    .initial-launch-plot {
        padding: var(--spacing-base);
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .mission-config-container {
        padding: var(--spacing-sm);
    }

    .drone-stats-summary {
        grid-template-columns: 1fr;
    }

    .drone-cards {
        padding: var(--spacing-sm);
    }

    .initial-launch-plot {
        padding: var(--spacing-sm);
    }
}

/* Drone Stats Summary */
.drone-stats-summary {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-base);
    margin-bottom: var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-sm);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-sm);
}

.stat-number {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Performance Optimizations */
.drone-cards {
    contain: layout style;
    will-change: scroll-position;
}

.initial-launch-plot {
    contain: layout style;
}

/* Animation Classes */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInFromLeft 0.3s var(--ease-out-cubic);
}

.slide-in-right {
    animation: slideInFromRight 0.3s var(--ease-out-cubic);
}

/* Focus Management */
.mission-config-container:focus-within {
    outline: none;
}

/* Print Styles */
@media print {
    .mission-config-container {
        background: white;
        color: black;
        box-shadow: none;
    }

    .heading-controls,
    .control-buttons {
        display: none;
    }
}