/* Mug Constructor v5 - Styles */

.mug-constructor-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
}

.mug-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mug-canvas-wrapper canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.mug-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mug-upload-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mug-upload-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    min-width: 120px;
}

.mug-file-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    background: white;
    transition: border-color 0.2s;
}

.mug-file-input:hover {
    border-color: #999;
}

.mug-file-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.mug-preview-info {
    font-size: 12px;
    color: #666;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    border-left: 3px solid #0066cc;
}

.mug-preview-info strong {
    color: #333;
}

.mug-button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mug-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mug-btn-primary {
    background: #0066cc;
    color: white;
    flex: 1;
}

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

.mug-btn-primary:active {
    background: #003d7a;
    transform: scale(0.98);
}

.mug-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.mug-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.mug-btn-secondary:hover {
    background: #e8e8e8;
    border-color: #999;
}

.mug-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
}

.mug-loading.active {
    display: block;
}

.mug-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: mug-spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes mug-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mug-error {
    padding: 12px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 13px;
    display: none;
}

.mug-error.active {
    display: block;
}

.mug-success {
    padding: 12px;
    background: #efe;
    border: 1px solid #cfc;
    border-radius: 4px;
    color: #3c3;
    font-size: 13px;
    display: none;
}

.mug-success.active {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .mug-constructor-container {
        padding: 15px;
        gap: 12px;
    }
    
    .mug-canvas-wrapper {
        height: 350px;
    }
    
    .mug-button-group {
        flex-direction: column;
    }
    
    .mug-btn {
        width: 100%;
    }
    
    .mug-upload-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mug-upload-label {
        min-width: auto;
    }
}

/* Print area visualization */
.mug-print-area-info {
    font-size: 12px;
    color: #666;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    border-left: 3px solid #ff9800;
    margin-top: 8px;
}

.mug-print-area-info strong {
    color: #ff9800;
}

/* Three.js canvas specific */
#mug-canvas {
    display: block;
    width: 100%;
    height: 100%;
}
