/*
Script: Configuration Selector Modal Styles v1.1.10.8
FileName: config_selector_styles.css
Author: Philippe Addelia
Created: September 01, 2025 PST
Modified: September 03, 2025 PST
Preferred location: Modules\Time Tracker\css\config_selector_styles.css
Purpose: Styles for hybrid configuration loading interface with enhanced design
*/

/* ============================================================================
   CONFIGURATION SELECTOR MODAL STYLES v1.1.10.8
   ============================================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(3px); }
}

.config-selector {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    max-width: 900px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: slideInModal 0.4s ease;
    position: relative;
}

@keyframes slideInModal {
    from { 
        transform: translateY(-30px) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.close-modal:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 0;
}

/* Configuration Options */
.config-options {
    padding: 30px 35px;
}

.option-section {
    margin-bottom: 35px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.option-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.option-section:last-child {
    margin-bottom: 0;
}

.option-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.option-section p {
    margin: 0 0 20px 0;
    color: #495057;
    line-height: 1.6;
    font-size: 1rem;
}

/* Configuration Buttons */
.config-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.config-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.config-btn::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: left 0.5s;
}

.config-btn:hover::before {
    left: 100%;
}

.config-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.config-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.config-btn-secondary {
    background: #e9ecef;
    color: #495057;
    border: 2px solid #dee2e6;
}

.config-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.config-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.config-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.config-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.config-btn:disabled:hover::before {
    left: -100% !important;
}

/* Status and Progress Indicators */
.config-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInStatus 0.3s ease;
}

@keyframes slideInStatus {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.config-status.loading {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

.config-status.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d2e;
    border-left: 4px solid #4caf50;
}

.config-status.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-left: 4px solid #f44336;
}

.config-status.warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57f17;
    border-left: 4px solid #ff9800;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* File Input Styling */
.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 12px;
}

.file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.file-input-label {
    padding: 12px 24px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    min-width: 200px;
    justify-content: center;
}

.file-input-label:hover {
    border-color: #667eea;
    background: #e8f0fe;
    color: #667eea;
}

.file-input:focus + .file-input-label {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Configuration List */
.config-list {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.config-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.config-item:hover {
    background-color: #f8f9fa;
}

.config-item:last-child {
    border-bottom: none;
}

.config-item-info {
    flex: 1;
}

.config-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.config-item-details {
    font-size: 0.875rem;
    color: #6c757d;
}

.config-item-actions {
    display: flex;
    gap: 8px;
}

.config-item-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.config-item-btn-primary {
    background: #667eea;
    color: white;
}

.config-item-btn-primary:hover {
    background: #5a67d8;
}

.config-item-btn-danger {
    background: #dc3545;
    color: white;
}

.config-item-btn-danger:hover {
    background: #c82333;
}

/* Advanced Options */
.advanced-options {
    margin-top: 25px;
    padding: 20px;
    background: #f1f3f4;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.advanced-options h5 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}

.option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-checkbox label {
    font-size: 0.95rem;
    color: #495057;
    cursor: pointer;
    margin: 0;
}

/* Modal Footer */
.modal-footer {
    padding: 25px 35px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border-radius: 0 0 16px 16px;
}

.modal-footer-info {
    font-size: 0.875rem;
    color: #6c757d;
    flex: 1;
}

.modal-footer-actions {
    display: flex;
    gap: 12px;
}

/* Help Section */
.help-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.help-section h4 {
    margin: 0 0 12px 0;
    color: #1565c0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section ul {
    margin: 0;
    padding-left: 20px;
    color: #1976d2;
}

.help-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.help-section li:last-child {
    margin-bottom: 0;
}

/* Configuration Version Info */
.version-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 0.875rem;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-info strong {
    color: #533f03;
}

/* Responsive Design */
@media (max-width: 768px) {
    .config-selector {
        width: 98%;
        max-height: 98vh;
        border-radius: 12px;
    }
    
    .modal-header,
    .config-options,
    .modal-footer {
        padding: 20px 25px;
    }
    
    .option-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .config-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .config-btn {
        min-width: 100%;
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .modal-footer-actions {
        justify-content: center;
    }
    
    .file-input-label {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-header,
    .config-options,
    .modal-footer {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .option-section h4 {
        font-size: 1.2rem;
    }
    
    .config-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .close-modal {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .config-selector {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .option-section {
        background: #34495e;
        border-left-color: #667eea;
    }
    
    .option-section h4 {
        color: #ecf0f1;
    }
    
    .option-section p {
        color: #bdc3c7;
    }
    
    .config-btn-secondary {
        background: #495057;
        color: #f8f9fa;
        border-color: #6c757d;
    }
    
    .config-btn-secondary:hover {
        background: #5a6268;
        border-color: #adb5bd;
    }
    
    .modal-footer {
        background: #34495e;
        border-top-color: #495057;
    }
    
    .modal-footer-info {
        color: #95a5a6;
    }
}

/* Print styles */
@media print {
    .modal-overlay,
    .config-selector {
        display: none !important;
    }
}