/* 3D Models Management Styles */

.models-3d-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.models-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.models-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.models-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.models-column h3 {
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
}

.models-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.model-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.model-card:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.model-info h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 1rem;
}

.model-description {
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.4;
}

.model-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.model-type {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.model-date {
    color: #6c757d;
    font-size: 0.75rem;
}

.component-price {
    font-weight: 600;
    color: #28a745;
    font-size: 0.875rem;
}

.model-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

.model-preview-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.model-preview {
    width: 100%;
    height: 300px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-style: italic;
}

.preview-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.configuration-builder {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.configuration-builder h3 {
    margin: 0 0 1.5rem 0;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.config-builder-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #495057;
}

.form-group select,
.form-group input {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.components-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8f9fa;
}

.component-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.component-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.component-item input[type="checkbox"] {
    margin: 0;
}

.config-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-actions .btn {
    width: 100%;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px dashed #dee2e6;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.header-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modal styles for 3D model upload */
.model-upload-dialog .modal-content {
    max-width: 800px;
    width: 90vw;
}

.model-upload-dialog .modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.file-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.preview-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-area h4 {
    margin: 0;
    color: #495057;
}

.position-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
}

.position-inputs input {
    text-align: center;
}

/* Responsive design */
@media (max-width: 1200px) {
    .models-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .config-builder-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .model-upload-dialog .modal-body {
        grid-template-columns: 1fr;
    }
}

/* Animation for loading states */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

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

/* Success/Error states */
.success-state {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-state {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 3D viewer specific styles */
.model-preview canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 6px;
}

/* Button variants for 3D interface */
.btn-3d {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-3d:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.btn-3d:active {
    transform: translateY(0);
}