/* Bicycle Wheel Builder Styles */

.wheel-builder-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.builder-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

/* Configuration Panel */
.config-panel {
    flex: 1;
    min-width: 320px;
    max-width: 450px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.config-panel h2 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.config-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.config-section:last-of-type {
    border-bottom: none;
}

.config-section h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #495057;
    font-weight: 600;
}

.config-section select {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.config-section select:hover {
    border-color: #007bff;
}

.config-section select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Color Picker */
.color-options {
    margin-top: 15px;
}

.color-options label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-picker button {
    width: 40px;
    height: 40px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-picker button:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.color-picker button.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #007bff;
    transform: scale(1.05);
}

/* Info Box */
.info-box {
    margin-top: 10px;
    padding: 10px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.info-box p {
    margin: 0;
    font-size: 13px;
    color: #495057;
}

/* Summary Section */
.summary-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.summary-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.summary-content p {
    margin: 8px 0;
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
}

.summary-content strong {
    color: #333;
    font-weight: 600;
}

/* Wheel Preview */
.wheel-preview {
    flex: 2;
    min-width: 500px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wheel-preview h2 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.wheel-canvas {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 20px;
}

.wheel-layers {
    position: relative;
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Layer z-index ordering (back to front) */
.rim-layer {
    z-index: 1;
}

.spoke-layer {
    z-index: 2;
}

.nipple-layer {
    z-index: 3;
}

.hub-layer {
    z-index: 4;
}

/* Placeholder */
.placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 3px dashed #dee2e6;
    border-radius: 50%;
}

.placeholder p {
    font-size: 18px;
    color: #6c757d;
    text-align: center;
    padding: 20px;
    max-width: 250px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .builder-layout {
        flex-direction: column;
    }
    
    .config-panel,
    .wheel-preview {
        max-width: 100%;
        min-width: 100%;
    }
    
    .wheel-canvas {
        min-height: 400px;
    }
}

@media (max-width: 600px) {
    .wheel-builder-container {
        padding: 10px;
    }
    
    .config-panel,
    .wheel-preview {
        padding: 15px;
    }
    
    .config-panel h2,
    .wheel-preview h2 {
        font-size: 20px;
    }
    
    .wheel-canvas {
        min-height: 300px;
    }
    
    .color-picker button {
        width: 35px;
        height: 35px;
    }
}

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

.wheel-layer.loading {
    animation: spin 2s linear infinite;
}

/* Hover effects for wheel layers */
.wheel-layer:hover {
    opacity: 0.95;
}