/* New Form Styling for Improved Layout and Appeal */

/* General Form Wrapper */
.order-form-wrapper {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

/* Step Indicator */
.form-steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.form-steps-indicator::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 3px;
    background-color: #e0e0e0;
    z-index: 1;
}

.form-steps-indicator .step {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    position: relative;
    color: #888;
    font-weight: 600;
    transition: color 0.3s;
}

.form-steps-indicator .step::before {
    content: attr(data-step);
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #fff;
    margin: 0 auto 8px;
    z-index: 2;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s;
    font-size: 14px;
}

.form-steps-indicator .step.active {
    color: #007bff; /* Primary color */
}

.form-steps-indicator .step.active::before {
    background-color: #007bff;
}

.form-steps-indicator .step.completed {
    color: #28a745; /* Success color */
}

.form-steps-indicator .step.completed::before {
    background-color: #28a745;
    content: '✓';
    font-size: 18px;
}

/* Multi-Step Form */
.multi-step-form {
    min-height: 300px; /* Ensure minimum height to prevent layout shift */
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

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

/* Form Groups and Labels */
.option-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.option-label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.service-option, .text-area, .quantity-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.service-option:focus, .text-area:focus, .quantity-field:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    max-width: 150px;
}

.qty-btn {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    color: #333;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.2s;
    width: 40px;
    height: 40px;
    line-height: 24px;
    text-align: center;
}

.qty-btn:hover {
    background-color: #e2e6ea;
}

.qty-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.qty-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.quantity-field {
    text-align: center;
    border-left: none;
    border-right: none;
    flex-grow: 1;
    min-width: 50px;
    height: 40px;
    padding: 0;
}

/* Item Type Buttons (for household) */
.item-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.item-type-btn {
    background-color: #f0f8ff;
    border: 2px solid #e0e0e0;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1 1 calc(33.333% - 10px); /* 3 items per row on desktop */
    min-width: 100px;
    text-align: center;
}

.item-type-btn:hover {
    border-color: #007bff;
    background-color: #e6f0ff;
}

.item-type-btn.selected {
    border-color: #007bff;
    background-color: #007bff;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-navigation .final-actions {
    justify-content: flex-end;
}

/* Total Price Section (Summary) */
.total-price-section {
    margin-top: 20px;
    padding: 20px;
    border: 2px solid #007bff;
    border-radius: 10px;
    background-color: #e6f0ff;
}

.total-price-section h4 {
    margin-top: 0;
    color: #007bff;
    border-bottom: 1px solid #cce0ff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.price-breakdown {
    display: grid;
    gap: 10px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    color: #333;
}

.price-line.total-line {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
    padding-top: 10px;
    border-top: 1px dashed #cce0ff;
    margin-top: 10px;
}

/* Button Styling (Assuming existing btn-primary/btn-secondary exist, but adding some polish) */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-steps-indicator {
        flex-wrap: wrap;
    }
    .form-steps-indicator .step {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }
    .form-steps-indicator::before {
        display: none; /* Hide connecting line on small screens */
    }
    .item-type-btn {
        flex: 1 1 calc(50% - 10px); /* 2 items per row on mobile */
    }
    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    .form-navigation button, .form-navigation a {
        width: 100%;
    }
}
