/* Custom CSS for RatesFinder Multi-step Form and Enhancements */

/* Error Messages */
.error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Form Steps */
.form-step {
    animation: fadeIn 0.3s ease-in;
}

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

/* Text Input Styling - Add padding to all form inputs */
.leadforms-input-text-inner[type="text"],
.leadforms-input-text-inner[type="email"] {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    line-height: normal !important;
    height: auto !important;
}

/* Fix placeholder vertical alignment */
.leadforms-input-text-inner::placeholder {
    line-height: normal !important;
    vertical-align: middle !important;
}

/* Phone Input Styling */
.iti {
    width: 100%;
}

.iti__flag-container {
    border-radius: 0.5rem 0 0 0.5rem;
}

.iti__selected-flag {
    padding: 0 0 0 12px;
    background-color: #f5f5f5 !important;
}

/* Intl Tel Input overrides to match design */
.iti--separate-dial-code .iti__selected-flag {
    background-color: #f5f5f5 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.iti--separate-dial-code .iti__selected-dial-code {
    margin-left: 6px;
    margin-right: 8px;
    color: #6b7280 !important;
    font-weight: 400;
    line-height: normal !important;
}

/* Phone input: match the same height as selects, center text vertically */
.iti--separate-dial-code input.leadforms-input-text-inner[type="tel"],
.iti--separate-dial-code .iti__tel-input,
.iti input[type="tel"] {
    padding-left: 90px !important;
    padding-right: 12px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 46px !important;
    line-height: 46px !important;
    box-sizing: border-box !important;
}

/* Flag container: fill full height, center contents */
.iti--separate-dial-code .iti__flag-container,
.iti .iti__flag-container {
    width: auto;
    min-width: 80px;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* Make sure iti container has relative positioning and full width */
.iti {
    position: relative !important;
    display: block !important;
}

/* Country dropdown styling */
.iti__country-list {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

.iti__country {
    padding: 8px 12px !important;
    color: #333 !important;
}

.iti__country:hover {
    background-color: #f5f5f5 !important;
}

.iti__country.iti__highlight {
    background-color: #e8f4ff !important;
}

.iti__dial-code {
    color: #666 !important;
}

.iti__country-name {
    color: #333 !important;
}

/* Success icon animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#form-step-3 svg {
    animation: checkmark 0.5s ease-in-out;
}

/* Smooth transitions for form elements */
input:focus, select:focus, textarea:focus {
    outline: none;
    transition: all 0.2s ease;
}

/* Loading state for submit button */
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-step h3 {
        font-size: 1.25rem;
    }
    
    .form-step p {
        font-size: 0.875rem;
    }
}
