/* Main form wrapper */
#kiwi-enquiry-form-wrapper {
    background: transparent;
    padding: 0;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    position: relative; /* Added for spinner positioning */
}

/* Ensure all elements use border-box */
#kiwi-enquiry-form-wrapper * {
    box-sizing: border-box;
}

/* Progress bar styles */
.kiwi-progress-bar {
    display: flex;
    justify-content: space-between;
    margin: 0 0 30px;
    position: relative;
    padding: 0;
    width: 100%;
}

.kiwi-progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.kiwi-progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 80px;
    background: #fff;
}

.kiwi-progress-step .step-number {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.kiwi-progress-step .step-label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 5px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
}

.kiwi-progress-step.active .step-number {
    background: #4CAF50;
    color: #fff;
}

.kiwi-progress-step.completed .step-number {
    background: #2196F3;
    color: #fff;
}

/* Form steps */
.kiwi-form-step {
    display: none;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kiwi-form-step.active {
    display: block;
    opacity: 1;
}

/* Form container */
#kiwi-enquiry-form {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
}

/* Shortcode specific styles */
.kiwi-enquiry-shortcode {
    /*max-width: 700px;*/
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
}

.kiwi-enquiry-shortcode .kiwi-enquiry-title {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
    color: #333;
}

.kiwi-enquiry-shortcode #kiwi-enquiry-form-wrapper {
    padding: 0;
}

/* Form groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
    margin: 0;
    max-width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

#enquiry_details {
    min-height: 160px;
    resize: vertical;
    width: 100%;
    max-width: 100%;
}

/* Age range inputs */
.age-range-inputs {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.age-range-inputs input {
    width: calc(50% - 7.5px);
    max-width: calc(50% - 7.5px);
}

.age-separator {
    color: #666;
    font-weight: bold;
}

/* Navigation buttons */
.form-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    width: 100%;
}

button.prev-step,
button.next-step,
button.submit-form {
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Added button interaction styles */
button.prev-step:active,
button.next-step:active,
button.submit-form:active {
    transform: translateY(1px);
}

button.prev-step {
    background: #f5f5f5;
    color: #333;
}

button.next-step,
button.submit-form {
    background: #4CAF50;
    color: #fff;
}

button.prev-step:hover {
    background: #e0e0e0;
}

button.next-step:hover,
button.submit-form:hover {
    background: #45a049;
}

/* Added ripple effect */
button.next-step::after,
button.submit-form::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

button.next-step:active::after,
button.submit-form:active::after {
    width: 100%;
    height: 100%;
}

/* Success message */
#kiwi-success-message {
    display: none;
    /* Just this line is different */
    background: #4CAF50;
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 4px;
    margin-top: 20px;
    width: 100%;
}

.success-content {
    max-width: 400px;
    margin: 0 auto;
}

.success-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 30px;
    margin-bottom: 20px;
}

/* Loading spinner */
#kiwi-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#kiwi-loading-spinner.visible {
    display: flex;
    opacity: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(76, 175, 80, 0.2);
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error states */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .kiwi-progress-step .step-label {
        display: none;
    }

    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }

    button.prev-step,
    button.next-step,
    button.submit-form {
        width: 100%;
    }

    .age-range-inputs {
        flex-direction: column;
        gap: 10px;
    }

    .age-range-inputs input {
        width: 100%;
        max-width: 100%;
    }
}

/* Fix for Google Places Autocomplete */
.pac-container {
    z-index: 1051 !important;
}

/* Added disabled state styles */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}