.moving-quote-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.widget-header {
    background: linear-gradient(to right, #2f2f2f, #424242);
    color: white;
    padding: 24px;
    text-align: center;
}

.widget-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.widget-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.step {
    display: flex;
    align-items: center;
    margin: 0 10px;
    font-size: 14px;
    color: #6c757d;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #017301;
    color: white;
}

.step.completed .step-number {
    background: #48b349;
    color: white;
}

.step.active {
    color: #017301;
}

.step.completed {
    color: #424242;
}

.widget-content {
    padding: 30px;
    min-height: 400px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

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

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #017301;
    box-shadow: 0 0 0 3px rgba(1, 115, 1, 0.1);
}

.furniture-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.furniture-item {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.furniture-item:hover {
    border-color: #61993B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.furniture-item.selected {
    border-color: #017301;
    background: #017301;
    color: white;
}

.furniture-image {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.furniture-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.furniture-image-placeholder {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.6;
}

.furniture-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.furniture-item h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.furniture-item p {
    margin: 0 0 10px 0;
    font-size: 12px;
    opacity: 0.8;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s ease;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.furniture-item:not(.selected) .quantity-btn {
    background: #424242;
    color: white;
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.quantity-btn:active {
    background: #DDFBD2 !important;
    color: #2f2f2f !important;
    transform: scale(0.95);
}

/* After click state - applied via JavaScript */
.quantity-btn.clicked {
    background: #48b349 !important;
    color: white !important;
}

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.volume-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.volume-summary h3 {
    margin: 0 0 10px 0;
    color: #017301;
    font-size: 18px;
}

.volume-display {
    font-size: 24px;
    font-weight: 700;
    color: #495057;
}

.navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

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

.btn-primary {
    background: linear-gradient(to right, #2f2f2f, #424242);
    color: white;
}

.btn-primary:hover {
    background: #015001;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.summary-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-section h3 {
    margin: 0 0 15px 0;
    color: #017301;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 14px;
}

.summary-item strong {
    color: #495057;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group input,
.form-group select {
    transition: all 0.3s ease;
}

.form-group.error input,
.form-group.error select {
    border-color: #dc3545;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group.error .error-message {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #28a745;
    background-color: #f8fff8;
}

.form-group input[type="email"]:invalid:not(:placeholder-shown),
.form-group input[name*="postcode"]:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Enhanced API validation error styling */
.form-group input.api-validation-error {
    background-color: #fff5f5 !important;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
    animation: validationError 0.4s ease-in-out;
}

/* Front-end validation error styling (lighter) */
.form-group input.frontend-validation-error {
    background-color: #ffeaea !important;
    border-color: #dc3545 !important;
    animation: validationError 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes validationError {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 500;
    color: #495057;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-left: 15px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #48b349;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.summary-section h4 {
    margin: 0 0 15px 0;
    color: #017301;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-bottom: 0;
    cursor: pointer;
    accent-color: #017301;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #495057;
}

.furniture-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #e1e5e9;
    margin: 20px 0 0 0;
    gap: 5px;
}

.furniture-tab {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.furniture-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.furniture-tab.active {
    background: linear-gradient(to right, #2f2f2f, #424242);
    color: white;
    border-color: #2f2f2f;
    border-bottom: 2px solid #2f2f2f;
}

.furniture-tab-content {
    padding: 20px 0;
    min-height: 200px;
}

.furniture-tab-panel {
    display: none;
}

.furniture-tab-panel.active {
    display: block;
}

@media (max-width: 1024px) {
    .moving-quote-widget {
        max-width: 700px;
        margin: 15px;
    }

    .furniture-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .furniture-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        gap: 2px;
    }

    .furniture-tab {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .moving-quote-widget {
        margin: 10px;
        border-radius: 0;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .furniture-grid {
        grid-template-columns: 1fr;
    }

    .step-indicator {
        padding: 15px 10px;
    }

    .step {
        margin: 0 5px;
        font-size: 12px;
    }

    .step-text {
        display: none;
    }

    .widget-content {
        padding: 20px;
    }

    .navigation {
        padding: 15px 20px;
    }

    /* Quick Presets responsive design */
    .quick-presets-container {
        flex-direction: column;
        gap: 8px;
    }

    .quick-presets-container button {
        min-width: 100%;
        padding: 12px 15px;
    }
}

/* iOS Safari zoom prevention */
button, input, select, textarea {
    font-size: 16px !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.quantity-controls {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
} 