/* Enquiry Form API - Frontend Styles */

.efa-form-wrapper {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
}

.efa-form {
    width: 100%;
}

/* Form Title */
.efa-form-title {
    font-family: "Poppins", sans-serif;
    font-size: 36px;
    font-weight: 600;
    font-style: normal;
    line-height: 60px;
    color: #2c3338;
    margin: 0 0 25px 0;
    text-align: left;
}

.efa-form-messages {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.efa-form-messages.success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.efa-form-messages.error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Thank You Message Styling - shown after successful submission */
.efa-form-messages.efa-thank-you-message {
    display: block;
    background: transparent;
    border: none;
    padding: 0px !important;
    text-align: left;
    color: #000;
}

.efa-form-messages.efa-thank-you-message h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 20px 0;
    color: #000;
}

.efa-form-messages.efa-thank-you-message p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    color: #333;
}

.efa-form-messages.efa-thank-you-message h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: #000;
}

.efa-form-messages.efa-thank-you-message ul,
.efa-form-messages.efa-thank-you-message ol {
    margin: 10px 0;
    padding-left: 20px;
}

.efa-form-messages.efa-thank-you-message li {
    margin: 5px 0;
    line-height: 1.6;
}

.efa-form-messages.efa-thank-you-message a {
    color: #0066cc;
    text-decoration: none;
}

.efa-form-messages.efa-thank-you-message a:hover {
    text-decoration: underline;
}

.efa-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 2fr));
    gap: 10px;
    margin-bottom: 5px;
}

.efa-form-group {
    position: relative;
}

.efa-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.5;
    color: #77787B;
}

.efa-form-group label .required {
    color: #e74c3c;
}

.efa-form-group input[type="text"],
.efa-form-group input[type="email"],
.efa-form-group input[type="tel"],
.efa-form-group input[type="url"],
.efa-form-group select,
.efa-form-group textarea {
    width: 100%;
    padding: 10px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.efa-form-group select {
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"%3e%3cpath fill="%23333" d="M6 9L1 4h10z"/%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.efa-form-group input:focus,
.efa-form-group select:focus,
.efa-form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Validation states */
.efa-form-group input.efa-invalid,
.efa-form-group input.efa-invalid:focus {
    border-color: #e74c3c;
}

.efa-form-group input.efa-valid,
.efa-form-group input.efa-valid:focus {
    border-color: #4CAF50;
}

.efa-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* International Tel Input Customization */
.efa-form-group .iti {
    width: 100%;
    display: block;
}

.efa-form-group .iti__flag-container {
    padding: 0;
}

.efa-form-group .iti__selected-flag {
    padding: 0 8px 0 12px;
    background: #f9f9f9;
    border-right: 1px solid #ddd;
}

.efa-form-group .iti__flag-container:hover .iti__selected-flag {
    background: #f0f0f0;
}

.efa-form-group .iti input[type="tel"] {
    padding-left: 52px;
}

.efa-form-group .iti--separate-dial-code input[type="tel"] {
    padding-left: 90px;
}

.efa-form-group .iti__country-list {
    border-radius: 4px;
    max-height: 200px;
}

.efa-form-group .iti__dial-code {
    color: #666;
}

/* Consent Message - Plain Text Only */
.efa-consent-message {
    margin: 20px 0 15px 0 !important;
    padding: 0 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-left: none !important;
    border-radius: 0 !important;
    font-size: 12px;
    line-height: 1.6;
    color: inherit !important;
}

.efa-consent-message p {
    margin: 0 0 10px 0;
}

.efa-consent-message p:last-child {
    margin-bottom: 0;
}

.efa-consent-message a {
    color: inherit !important;
    text-decoration: underline !important;
    font-weight: normal !important;
}

.efa-consent-message a:hover {
    text-decoration: none !important;
}

.efa-consent-message strong {
    color: inherit;
}

.efa-consent-message ul,
.efa-consent-message ol {
    margin: 10px 0;
    padding-left: 25px;
}

.efa-consent-message li {
    margin-bottom: 5px;
}

.efa-submit-btn {
    padding: 11px 26px 11px 26px;
    background-color: #ED0000;
    color: white;
    font-family: "Helvetica", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #ED0000;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    max-width: 200px;
    display: block;
    margin: 0 auto;
}

.efa-submit-btn:hover {
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: #D60000;
    background-color: #fff;
    color: #D60000;
}

.efa-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.efa-btn-loader {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .efa-form-wrapper {
        padding: 20px;
    }
    
    .efa-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .efa-submit-btn {
        max-width: 100%;
    }
    
    .efa-form-group .iti__country-list {
        max-height: 150px;
    }
}

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

.efa-btn-loader::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

/* Phone Validation States */
.efa-form-group input.efa-phone-valid {
    border-color: #28a745 !important;
    background-color: #f0f9f4;
}

.efa-form-group input.efa-phone-invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
}

.efa-form-group input.efa-phone-typing {
    border-color: #4CAF50;
}

.efa-phone-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

/* Success/Error Icons for Phone Input */
.efa-form-group input.efa-phone-valid:not(:focus) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2328a745' viewBox='0 0 16 16'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.efa-form-group input.efa-phone-invalid:not(:focus) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

.efa-form-group .iti__selected-flag:hover {
    background: #f0f0f0;
}
