@import './DesignTokens.css';

/* Professional Theme-Aware Mission Details Styles */
.mission-details {
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-tertiary));
    border: 1px solid var(--color-border-primary);
    box-shadow: var(--shadow-base);
    position: relative;
    backdrop-filter: blur(4px);
}

.mission-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--brand-secondary));
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.selected-mission-card {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-bg-tertiary));
    border-radius: var(--border-radius-base);
    border: 1px solid var(--color-primary-border);
}

.mission-icon {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-base);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.mission-name {
    font-size: var(--font-size-xl);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-base);
    font-weight: var(--font-weight-bold);
    font-family: var(--font-family-primary);
    background: linear-gradient(135deg, var(--color-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mission-description {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-relaxed);
    font-family: var(--font-family-primary);
}

.mission-preview {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--color-bg-tertiary);
    border-radius: var(--border-radius-base);
    border: 1px solid var(--color-border-primary);
}

.mission-preview h3 {
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-base);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

.mission-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-base);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-primary);
}

.time-selection {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--color-bg-tertiary);
    border-radius: var(--border-radius-base);
    border: 1px solid var(--color-border-primary);
}

.time-selection label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    padding: var(--spacing-sm) var(--spacing-base);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-base);
}

.time-selection label:hover {
    background: var(--color-bg-quaternary);
}

.time-selection input[type="radio"] {
    accent-color: var(--color-primary);
}

.time-delay-slider,
.time-picker {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--color-bg-tertiary);
    border-radius: var(--border-radius-base);
    border: 1px solid var(--color-border-primary);
    text-align: center;
}

.time-delay-slider label,
.time-picker label {
    display: block;
    margin-bottom: var(--spacing-base);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
}

.time-delay-slider input[type="range"] {
    width: 100%;
    margin-top: var(--spacing-base);
    accent-color: var(--color-primary);
}

.time-picker input[type="time"] {
    padding: var(--spacing-sm) var(--spacing-base);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-sm);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
}

.back-button,
.mission-button {
    margin-top: var(--spacing-base);
    border: none;
    padding: var(--spacing-base) var(--spacing-xl);
    cursor: pointer;
    border-radius: var(--border-radius-base);
    width: 100%;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-family-primary);
    transition: var(--transition-all);
    position: relative;
    overflow: hidden;
}

.mission-button {
    background: linear-gradient(135deg, var(--color-primary), var(--brand-secondary));
    color: var(--color-text-primary);
    box-shadow: var(--shadow-base);
}

.mission-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-base);
}

.mission-button:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mission-button:hover::before {
    left: 100%;
}

.back-button {
    background: linear-gradient(135deg, var(--color-text-tertiary), var(--color-text-muted));
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-base);
}

.back-button:hover {
    background: linear-gradient(135deg, var(--color-text-secondary), var(--color-text-tertiary));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
  
/* Trajectory Status Summary Styles - Theme Aware */
.trajectory-status-summary {
    background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-tertiary));
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.trajectory-status-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-info), var(--brand-secondary));
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.trajectory-status-summary h3 {
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-family-primary);
}

.status-loading,
.status-error,
.status-unavailable {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-base);
    border-radius: var(--border-radius-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border: 1px solid;
}

.status-loading {
    background: var(--color-info-light);
    color: var(--color-text-primary);
    border-color: var(--color-info-border);
}

.status-error {
    background: var(--color-danger-light);
    color: var(--color-text-primary);
    border-color: var(--color-danger-border);
}

.status-unavailable {
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    border-color: var(--color-border-secondary);
}

.loading-spinner {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cluster-summary {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: var(--spacing-base);
}

.stat-item {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-base);
    padding: var(--spacing-base) var(--spacing-sm);
    text-align: center;
    transition: var(--transition-all);
    box-shadow: var(--shadow-sm);
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-border);
}

.stat-value {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-family-primary);
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-weight-medium);
}

.cluster-details {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--border-radius-base);
    padding: var(--spacing-base);
    box-shadow: var(--shadow-sm);
}

.cluster-details h4 {
    margin: 0 0 var(--spacing-base) 0;
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

.cluster-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.cluster-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-base);
    background: var(--color-bg-tertiary);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--color-primary);
    transition: var(--transition-base);
}

.cluster-item:hover {
    background: var(--color-bg-quaternary);
}

.cluster-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.cluster-leader {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
}

.cluster-count {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.cluster-status {
    display: flex;
    align-items: center;
}

.status-ready {
    color: var(--color-success);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

.status-missing {
    color: var(--color-danger);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

.status-reminder {
    background: var(--color-info-light);
    border: 1px solid var(--color-info-border);
    border-radius: var(--border-radius-base);
    padding: var(--spacing-base);
    display: flex;
    gap: var(--spacing-base);
    align-items: flex-start;
}

.reminder-icon {
    font-size: var(--font-size-lg);
    margin-top: var(--spacing-xs);
}

.reminder-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    line-height: var(--line-height-normal);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mission-details {
        padding: var(--spacing-lg);
    }

    .time-selection {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .cluster-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .cluster-status {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .mission-details {
        padding: var(--spacing-base);
    }

    .selected-mission-card {
        padding: var(--spacing-lg);
    }

    .mission-icon {
        font-size: var(--font-size-2xl);
    }

    .mission-name {
        font-size: var(--font-size-lg);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .mission-button:hover,
    .back-button:hover,
    .stat-item:hover {
        transform: none;
    }

    .loading-spinner {
        animation: none;
    }
}

/* Focus states for accessibility */
.mission-button:focus-visible,
.back-button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mission-details,
    .selected-mission-card,
    .mission-preview,
    .time-selection,
    .time-delay-slider,
    .time-picker,
    .trajectory-status-summary {
        border-width: 2px;
    }

    .mission-button,
    .back-button {
        border: 1px solid var(--color-border-primary);
    }
}
  