/* Absolute layout safety fixes */
.vfe-wrapper input,
.vfe-wrapper select,
.vfe-wrapper textarea {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
}

.vfe-form-group {
    min-width: 0 !important;
    overflow: hidden;
    /* Avoid overflow */
}

/* Ensure grid breaks nicely */
@media (max-width: 1200px) {
    .vfe-form-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* Ensure rule inputs are not huge */
.vfe-rule-header input {
    width: auto !important;
    flex: 1;
}

.vfe-condition-row,
.vfe-flex-gap {
    flex-wrap: wrap !important;
}

/* Fix Amenities Checkbox Grid */
.vfe-checkbox-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 10px !important;
}

.vfe-checkbox-item {
    display: flex !important;
    align-items: flex-start !important;
    /* Top align multiline text */
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100% !important;
}

.vfe-checkbox-item input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    /* Prevent shrinking */
    flex-shrink: 0 !important;
    margin: 3px 10px 0 0 !important;
    /* Top aligned margin */
    cursor: pointer;
}

.vfe-checkbox-item label {
    color: var(--vfe-text-primary);
    font-size: 14px !important;
    line-height: 1.4 !important;
    cursor: pointer;
    text-align: left !important;
}

.vfe-select-single {
    width: 100% !important;
    padding: 10px 15px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    font-size: 14px !important;
    color: #1e293b !important;
    height: 45px !important;
    cursor: pointer !important;
    -webkit-appearance: auto !important;
    appearance: auto !important;
}

/* Wizard Success Screen */
.vfe-wizard-success {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 40px auto;
    animation: vfeSlideUp 0.5s ease-out;
}

@keyframes vfeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vfe-wizard-success-icon {
    font-size: 80px;
    margin-bottom: 24px;
    display: inline-block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.vfe-wizard-success h3 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 16px;
    font-weight: 800;
}

.vfe-wizard-success p {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
}

.vfe-wizard-success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}