/*
 * Multi-Step Form Styles
 * Matching quote-form-container design
 *
 * @package Better_Call_Moving
 * @since 1.0.0
 */

/* Form Container */
.multi-step-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.multi-step-form-container {
    background: transparent;
    position: relative;
    z-index: 10;
    width: 470px;
    max-width: 100%;
    animation: slideInUp 0.8s ease-out;
}

/* Form Header */
.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.form-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Progress Indicator */
.form-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #FF0000 0%, #CC0000 100%);
    width: 25%;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
}

.step-indicator.active {
    background: #FF0000;
    color: white;
}

.step-indicator.completed {
    background: #28a745;
    color: white;
}

/* Form Steps */
.multi-step-form {
    position: relative;
}

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

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

.step-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.3;
}

/* Form Groups */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    font-family: 'DM Sans', sans-serif;
}

/* Form Controls */
.form-control {
    width: 100%;
    height: 95px;
    border-radius: 8px;
    padding: 35px 20px 20px 20px;
    font-size: 16px;
    color: #495057;
    border: 2px solid #e9ecef;
    background-color: white;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
    outline: none;
}

.form-control:focus {
    border-color: #FF0000;
    box-shadow: 0 0 0 0.2rem rgba(255, 0, 0, 0.25);
}

.form-control::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Form Icons */
.form-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: color 0.2s ease;
    pointer-events: none;
}

.form-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.form-group:focus-within .form-icon {
    color: #007bff;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Buttons */
.btn-continue,
.btn-back {
    font-family: 'DM Sans', sans-serif;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    min-width: 120px;
}

.btn-continue {
    background: linear-gradient(45deg, #FF0000 0%, #CC0000 100%);
    border: 2px solid #FF0000;
    color: white;
    width: 100%;
}

.btn-continue:hover:not(:disabled) {
    background: linear-gradient(45deg, #CC0000 0%, #990000 100%);
    border-color: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

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


.btn-back {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
}

.btn-back:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn-back {
    flex: 0 0 auto;
}

.form-actions .btn-continue {
    flex: 1;
}

/* Calendar Popup */
.calendar-popup {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    border: 2px solid #e9ecef;
    margin-top: 5px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-month {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    font-family: 'DM Sans', sans-serif;
}

.calendar-nav {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.calendar-nav:hover {
    color: #FF0000;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 15px;
}

.calendar-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    border: none;
    background: none;
}

.calendar-day.weekday-header {
    font-weight: 700 !important;
    color: #1a1a1a !important;
    cursor: default !important;
    font-size: 13px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent !important;
}

.calendar-day.prev-month,
.calendar-day.next-month {
    color: #bbb !important;
    background: #f8f9fa !important;
}

.calendar-day.prev-month:hover,
.calendar-day.next-month:hover {
    color: #888 !important;
    background: #e9ecef !important;
}

.calendar-day.prev-month.disabled,
.calendar-day.next-month.disabled,
.calendar-day.disabled {
    color: #ddd !important;
    cursor: not-allowed !important;
    background: #f8f9fa !important;
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day:not(.disabled):not(.selected) {
    background: #f8f9fa;
    color: #1a1a1a;
    cursor: pointer;
}

.calendar-day:not(.disabled):not(.selected):hover {
    background: #e9ecef;
}


.calendar-day.selected {
    background: #FF0000 !important;
    color: white !important;
    transform: scale(1.1);
}


/* Size Modal */
.size-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    color: #1a1a1a;
}

.modal-header {
    padding: 15px 30px 10px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.modal-header h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #FF0000;
}

.modal-body {
    padding: 10px 30px 30px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-body h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

.size-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.size-option {
    padding: 18px 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: #495057;
    background: #f8f9fa;
    min-height: 50px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.size-option:hover {
    background: #e9ecef;
    border-color: #FF0000;
}

.size-option.selected {
    background: #FF0000;
    color: white;
    border-color: #FF0000;
}

/* Size Details */
.size-details {
    margin-top: 1.5rem;
}

.selected-size {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 2rem;
    text-align: center;
}

.size-name {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
    display: block;
    margin-bottom: 5px;
}

.size-sqft {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #6c757d;
}

/* Extra Rooms */
.extra-rooms h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.room-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 2rem;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #495057;
    min-height: 48px;
}

.checkbox-item:hover {
    background: #f8f9fa;
}

.checkbox-item input[type="checkbox"] {
    accent-color: #FF0000;
    transform: scale(1.2);
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-item span {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    padding-top: 1px;
}

/* Stairs Step Styling */
.form-step[data-step="3"] .form-group {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.form-step[data-step="3"] .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Selection Buttons */
.selection-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    margin-top: 12px;
}

.selection-button {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    color: #6c757d;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
    min-width: 35px;
    text-align: center;
}

/* Special styling for longer button text */
.selection-button[data-value="Elevator"],
.selection-button[data-value="Private Home"] {
    font-size: 11px;
    padding: 6px 10px;
}

/* Client Details Step - Compact form fields */
.form-step[data-step="4"] .form-control {
    height: 50px;
    padding: 12px 50px 12px 15px;
    font-size: 14px;
}

.form-step[data-step="4"] .form-icon {
    top: 50%;
    right: 15px;
}

.form-step[data-step="4"] .form-icon svg {
    width: 18px;
    height: 18px;
}

.selection-button:hover {
    background: #e9ecef;
    border-color: #FF0000;
}

.selection-button.selected {
    background: #FF0000;
    border-color: #FF0000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

/* Loading State */
.loading-step {
    text-align: center;
    padding: 2rem 0;
}

.loading-content h3 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.loading-content p {
    color: #6c757d;
    font-family: 'DM Sans', sans-serif;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-left: 4px solid #FF0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

/* Success State */
.success-step {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.success-content h3 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 1rem;
}

.success-content p {
    color: #6c757d;
    font-family: 'DM Sans', sans-serif;
    margin-bottom: 1rem;
}


/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-family: 'DM Sans', sans-serif;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Responsive Design */
@media (max-width: 991px) {
    .multi-step-form-container {
        width: 100%;
        margin-top: 30px;
        padding: 30px 20px;
    }

    .form-control {
        height: 80px;
        padding: 30px 20px 15px 20px;
    }

    .form-title {
        font-size: 28px;
    }

    .step-title {
        font-size: 24px;
    }


}

@media (max-width: 576px) {
    .multi-step-form-container {
        width: 100%;
        margin-top: 20px;
        padding: 25px 15px;
        border-radius: 20px;
    }

    .form-control {
        height: 75px;
        padding: 28px 15px 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-title {
        font-size: 24px;
    }

    .step-title {
        font-size: 20px;
    }

    .form-group label {
        top: 10px;
        left: 15px;
        font-size: 11px;
    }

    .form-icon {
        right: 15px;
    }

    .form-icon svg {
        width: 18px;
        height: 18px;
    }

    .btn-continue,
    .btn-back {
        padding: 12px 20px;
        font-size: 14px;
    }

    .btn-quick-call {
        padding: 12px 20px;
        font-size: 14px;
        margin-top: 10px;
    }

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

    .form-row .form-group {
        margin-bottom: 1.5rem;
    }

    .room-checkboxes {
        grid-template-columns: 1fr;
    }

    .selection-buttons {
        gap: 8px;
    }

    .selection-button {
        font-size: 14px;
        padding: 10px 16px;
        min-width: 40px;
    }

    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }

    .modal-header,
    .modal-body {
        padding: 15px 20px;
    }

    .calendar-popup {
        left: -10px;
        right: -10px;
    }

    .calendar-day {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

}