/* Hurricane Door Visualizer Styles */

.hurricane-visualizer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Title & Description */
.visualizer-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    text-align: center;
}

.visualizer-description {
    font-size: 18px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 40px;
}

/* Steps */
.visualizer-step {
    margin-bottom: 40px;
}

.visualizer-step h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.step-instruction {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 20px;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color, #0066cc);
    background: #f1f5f9;
}

.upload-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.upload-icon {
    font-size: 48px;
}

.upload-text {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.upload-hint {
    font-size: 14px;
    color: #9ca3af;
}

/* Upload Preview */
.upload-preview {
    text-align: center;
}

#uploaded-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.btn-change-image {
    padding: 12px 24px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-change-image:hover {
    background: #e5e7eb;
}

/* Canvas */
.canvas-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

#visualizer-canvas {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

.canvas-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color, #0066cc);
    color: #fff;
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Colour Selector */
.colour-comparison-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.colour-selector h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.colour-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.colour-option {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.colour-option:hover {
    border-color: var(--primary-color, #0066cc);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.colour-option.selected {
    border-color: var(--primary-color, #0066cc);
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.colour-swatch {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.colour-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.colour-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.colour-ral {
    font-size: 12px;
    color: #9ca3af;
}

/* Comparison View */
.comparison-view {
    position: relative;
}

/* Before/After Slider */
.before-after-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.comparison-image {
    width: 100%;
    position: relative;
}

.comparison-image img {
    width: 100%;
    height: auto;
    display: block;
}

.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: inset(0 0 0 50%);
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #fff;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: ew-resize;
}

.comparison-label {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
}

.before-image .comparison-label {
    left: 20px;
}

.after-image .comparison-label {
    right: 20px;
}

/* Side by Side */
.side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.comparison-half {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.comparison-half img {
    width: 100%;
    height: auto;
    display: block;
}

/* Toggle View */
.toggle-view {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.toggle-view .comparison-image {
    display: none;
    width: 100%;
}

.toggle-view .comparison-image.active {
    display: block;
}

.toggle-view img {
    width: 100%;
    height: auto;
    display: block;
}

.toggle-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-radius: 12px;
    z-index: 10;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary-color, #0066cc);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-overlay p {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

/* Selected Colours Info */
.selected-colours-info {
    margin-top: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.current-colour {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.colour-name-display {
    color: var(--primary-color, #0066cc);
    font-weight: 600;
}

/* Actions */
.visualizer-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error Messages */
.visualizer-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #fca5a5;
    font-weight: 500;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hurricane-visualizer-container {
        padding: 20px 16px;
    }
    
    .visualizer-title {
        font-size: 24px;
    }
    
    .visualizer-description {
        font-size: 16px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .colour-comparison-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .colour-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .colour-option {
        padding: 10px;
    }
    
    .colour-swatch {
        width: 35px;
        height: 35px;
    }
    
    .side-by-side {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .canvas-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .canvas-controls button {
        width: 100%;
    }
    
    .visualizer-actions {
        flex-direction: column;
    }
    
    .visualizer-actions button {
        width: 100%;
    }
    
    .comparison-label {
        font-size: 12px;
        padding: 6px 12px;
        top: 10px;
    }
    
    .before-image .comparison-label {
        left: 10px;
    }
    
    .after-image .comparison-label {
        right: 10px;
    }
}

/* Print Styles */
@media print {
    .upload-area,
    .canvas-controls,
    .colour-selector,
    .visualizer-actions,
    .btn-change-image {
        display: none !important;
    }
    
    .comparison-view {
        page-break-inside: avoid;
    }
}
