/* Module Dependency System - Slide Over Panel */
.module-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); /* Increased contrast for premium feel */
    backdrop-filter: blur(6px); /* Smoother blur */
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    /* GIS V1 Panel Motion: 240ms, cubic-bezier(0.4, 0, 0.2, 1) */
    transition: opacity 240ms cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.module-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.module-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 480px;
    max-width: 90vw;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    /* GIS V1 Panel Motion: 240ms, cubic-bezier(0.4, 0, 0.2, 1) */
    transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 240ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.module-panel.active {
    transform: translateX(0);
}

.module-panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.module-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.module-panel-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Dependency Items */
.dependency-item {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.dependency-item.missing {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.dependency-item.recommended {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.dependency-item.configured {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.dependency-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dependency-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dependency-item-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.dependency-item-icon.missing {
    background: #fed7aa;
    color: #92400e;
}

.dependency-item-icon.recommended {
    background: #dbeafe;
    color: #1e40af;
}

.dependency-item-icon.configured {
    background: #dcfce7;
    color: #166534;
}

.dependency-item-content {
    flex: 1;
}

.dependency-item-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.dependency-item-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

.dependency-item-action {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.section-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.section-header-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Completion Indicator */
.completion-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.completion-progress {
    flex: 1;
}

.completion-progress-bar {
    height: 0.375rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.completion-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: #089e97;
    transition: width 0.3s ease;
}

.completion-text {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    justify-content: space-between;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-not-configured {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-in-progress {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-optimized {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Quick Action Buttons */
.quick-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.quick-action-button {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quick-action-button-fix-all {
    background: #dc2626;
    color: white;
    border: 1px solid #dc2626;
}

.quick-action-button-fix-all:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.quick-action-button-ai {
    background: #089e97;
    color: white;
    border: 1px solid #089e97;
}

.quick-action-button-ai:hover {
    background: #078b85;
    transform: translateY(-1px);
}

.quick-action-button-test {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.quick-action-button-test:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
}

.empty-state-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    background: #f3f4f6;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .module-panel {
        width: 100%;
        max-width: 100%;
    }
}