/* Floor Visualizer Pro - Frontend Styles */

.fvp-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.fvp-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.fvp-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.fvp-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fvp-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.fvp-upload-area {
    border: 2px dashed #0073aa;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
    display: block;
    user-select: none;
}

.fvp-upload-area:hover {
    background: #f0f7ff;
    border-color: #005a87;
}

.fvp-file-input {
    display: none;
}

.fvp-upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.fvp-upload-text {
    margin: 8px 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.fvp-upload-hint {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.fvp-status {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.fvp-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fvp-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.fvp-materials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.fvp-material-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9f9f9;
}

.fvp-material-item:hover {
    background: #f0f0f0;
    border-color: #ddd;
}

.fvp-material-item.active {
    background: #e8f4f8;
    border-color: #0073aa;
}

.fvp-material-swatch {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.fvp-material-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-align: center;
    line-height: 1.2;
}

.fvp-button {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.fvp-button-primary {
    background: #0073aa;
    color: white;
}

.fvp-button-primary:hover:not(:disabled) {
    background: #005a87;
}

.fvp-button-secondary {
    background: #6c757d;
    color: white;
}

.fvp-button-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.fvp-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fvp-loading {
    padding: 12px;
    background: #cce5ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #0073aa;
}

.fvp-loading p {
    margin: 0;
    animation: fvp-pulse 1.5s ease-in-out infinite;
}

@keyframes fvp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.fvp-canvas-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fvp-canvas-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

#fvpCanvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.fvp-info {
    background: #e8f4f8;
    border-left: 4px solid #0073aa;
    padding: 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fvp-wrapper {
        grid-template-columns: 1fr;
    }
    
    .fvp-controls {
        height: auto;
        position: relative;
    }
    
    .fvp-materials-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .fvp-button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .fvp-container {
        padding: 12px;
    }
    
    .fvp-wrapper {
        gap: 12px;
    }
    
    .fvp-controls {
        padding: 12px;
        gap: 12px;
    }
    
    .fvp-materials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fvp-section {
        gap: 8px;
    }
    
    .fvp-title {
        font-size: 14px;
    }
    
    .fvp-canvas-container {
        min-height: 300px;
    }
}