/* Code Generation Components Styles */

.code-generator-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.code-generator-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.code-generator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.code-editor {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #404040;
    transition: border-color 0.3s ease;
}

.code-editor:focus {
    border-color: #007acc;
    outline: none;
}

.code-editor.readonly {
    background: #f5f5f5;
    color: #333;
    border-color: #ddd;
}

/* Syntax Highlighting */
.syntax-keyword {
    color: #569cd6;
}

.syntax-string {
    color: #ce9178;
}

.syntax-comment {
    color: #6a9955;
    font-style: italic;
}

.syntax-function {
    color: #dcdcaa;
}

.syntax-number {
    color: #b5cea8;
}

.syntax-operator {
    color: #d4d4d4;
}

/* Template Cards */
.template-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #007acc;
}

.template-card.selected {
    border-color: #007acc;
    background: #f0f8ff;
}

.template-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 10px 10px 0 0;
}

.template-card-content {
    padding: 16px;
}

/* Quality Metrics */
.quality-metric {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 4px solid #007acc;
    transition: all 0.3s ease;
}

.quality-metric:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quality-metric.excellent {
    border-left-color: #28a745;
}

.quality-metric.good {
    border-left-color: #ffc107;
}

.quality-metric.poor {
    border-left-color: #dc3545;
}

/* Progress Bars */
.quality-progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
    margin: 8px 0;
}

.quality-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.quality-progress-bar.excellent {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.quality-progress-bar.good {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.quality-progress-bar.poor {
    background: linear-gradient(90deg, #dc3545, #e83e8c);
}

/* Issue Indicators */
.issue-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
}

.issue-indicator.critical {
    background: #dc3545;
    color: white;
}

.issue-indicator.major {
    background: #fd7e14;
    color: white;
}

.issue-indicator.minor {
    background: #ffc107;
    color: #212529;
}

.issue-indicator.suggestion {
    background: #17a2b8;
    color: white;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #007acc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #0056b3;
    background: #e9ecef;
}

.file-upload-area.dragover {
    border-color: #28a745;
    background: #d4edda;
}

.file-upload-icon {
    font-size: 48px;
    color: #007acc;
    margin-bottom: 16px;
}

/* Documentation Sections */
.documentation-section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #007acc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.documentation-section h3 {
    color: #007acc;
    margin-bottom: 8px;
    font-weight: 600;
}

.documentation-section p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Template Parameters */
.template-parameter {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.template-parameter:hover {
    border-color: #007acc;
    background: #e3f2fd;
}

.template-parameter-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

.template-parameter-description {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007acc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .code-generator-container {
        padding: 10px;
    }
    
    .code-generator-card {
        margin-bottom: 16px;
    }
    
    .template-card {
        margin-bottom: 12px;
    }
    
    .file-upload-area {
        padding: 20px;
    }
    
    .file-upload-icon {
        font-size: 32px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .code-generator-card {
        background: rgba(30, 30, 30, 0.95);
        color: #d4d4d4;
    }
    
    .template-card {
        background: #2d2d2d;
        color: #d4d4d4;
    }
    
    .quality-metric {
        background: #2d2d2d;
        color: #d4d4d4;
    }
    
    .documentation-section {
        background: #2d2d2d;
        color: #d4d4d4;
    }
    
    .template-parameter {
        background: #3d3d3d;
        border-color: #555;
        color: #d4d4d4;
    }
    
    .template-parameter:hover {
        background: #4d4d4d;
        border-color: #007acc;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Custom Scrollbar */
.code-editor::-webkit-scrollbar {
    width: 8px;
}

.code-editor::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.code-editor::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

.code-editor::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.success {
    background: #28a745;
}

.status-indicator.warning {
    background: #ffc107;
}

.status-indicator.error {
    background: #dc3545;
}

.status-indicator.info {
    background: #17a2b8;
} 