/* ==============================================
   Ask Now Form - Custom ACF Styles
   (ACF assets are dequeued, all styles are custom)
   ============================================== */

/* ==============================================
   1. Utility Classes
   ============================================== */

.hidden {
    display: none;
}

.show {
    opacity: 1;
}

/* ==============================================
   2. Color Theme Variables (via classes)
   ============================================== */

.orange-bg {
    background: linear-gradient(135deg, #f4a261, #e76f51);
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.3);
}

.orange-border {
    border: 2px solid #f4a261;
}

.green-bg {
    background: linear-gradient(135deg, #2d9a50, #1e6b3a);
    box-shadow: 0 4px 15px rgba(45, 154, 80, 0.3);
}

.green-border {
    border: 2px solid #2d9a50;
}

/* ==============================================
   3. Small Contact Button
   ============================================== */

#small-contact-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

#small-contact-button {
    border-radius: 25px;
    transition: all 0.3s ease;
    padding: 0.4em 0.6em;
    cursor: pointer;
}

#small-contact-button button {
    border: none;
    color: white;
    background: none;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 2;
    cursor: pointer;
}

#small-contact-button i {
    margin-left: 0.4em;
}

#small-contact-button.orange-bg:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
    background: linear-gradient(135deg, #e76f51, #d8553f);
}

/* ==============================================
   4. Contact Banner
   ============================================== */

#contact-banner * {
    margin: 0;
    font-size: 16px;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    white-space: normal;
}

#contact-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.1);
}

#contact-banner > * {
    margin: 0 1rem;
}

#contact-banner button {
    border: none;
    background: none;
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    max-width: 150px;
}

#contact-banner-icon,
#success-message__icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

#success-message__icon {
    margin-top: 1em;
}

#contact-banner-actions {
    flex-shrink: 0;
    overflow-wrap: break-word;
    hyphens: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 0.5em;
}

#contact-banner-actions i {
    margin-left: 0.4em;
}

#contact-banner-actions__contact-us,
#contact-banner-actions__call-now {
    border-radius: 25px;
    transition: all 0.3s ease;
    padding: 0.4em 0.6em;
    cursor: pointer;
}

/* Hover states for banner action buttons */
#contact-banner-actions__contact-us.orange-bg:hover,
#contact-banner-actions__call-now.orange-bg:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
    background: linear-gradient(135deg, #e76f51, #d8553f);
}

#contact-banner-actions__contact-us.green-bg:hover,
#contact-banner-actions__call-now.green-bg:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45, 154, 80, 0.4);
    background: linear-gradient(135deg, #1e6b3a, #155128);
}

@media (max-width: 1440px) {
    #contact-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* ==============================================
   5. Modal Dialog (Form Container)
   ============================================== */

#ask-now-form {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1001;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#ask-now-form form {
    margin-top: 1em;
}

#ask-now-form__dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 40vw;
    max-height: 80vh;
    pointer-events: auto;
    padding: 48px;
    border-radius: 25px;
    transition: all 200ms ease-in-out;
    font-size: 0.6em;
    overflow: auto;
}

@media (max-width: 768px) {
    #ask-now-form__dialog {
        width: 80%;
        padding: 20px;
    }
}

#ask-now-form__close-btn {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-24px, 24px);
    font-size: 24px;
}

#ask-now-form button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    padding: 0;
}

#ask-now-form__close-btn button {
    color: #f4a261;
}

#ask-now-form__close-btn button:hover {
    color: #e76f51;
}

#ask-now-form__dialog .success-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 16px;
}

#ask-now-form i {
    font-size: unset;
}

/* ==============================================
   6. ACF Form Base Styles
   ============================================== */

/* Hide ACF general validation error banner */
.acf-form > .acf-notice.acf-error-message.-dismiss {
    display: none;
}

#anf-inquiry-form {
    font-size: 16px;
}

.acf-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.acf-fields > .acf-field {
    border: none;
    padding: 0;
    margin-bottom: 16px;
}

/* ==============================================
   7. ACF Field Labels
   ============================================== */

.acf-field .acf-label {
    margin-bottom: 6px;
}

.acf-field .acf-label label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: block;
}

.acf-field .acf-label .acf-required {
    color: #e76f51;
    margin-left: 2px;
}

/* ==============================================
   8. ACF Input Fields
   ============================================== */

.acf-field .acf-input,
.acf-field .acf-input-wrap {
    width: 100%;
}

.acf-field input[type="text"],
.acf-field input[type="email"],
.acf-field input[type="number"],
.acf-field input[type="tel"],
.acf-field textarea,
.acf-field select {
    width: 100%;
    padding: 8px 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-size: 16px;
    line-height: 1.4;
    background-color: #fff;
    box-sizing: border-box;
}

.acf-field input[type="text"]:focus,
.acf-field input[type="email"]:focus,
.acf-field input[type="number"]:focus,
.acf-field input[type="tel"]:focus,
.acf-field textarea:focus,
.acf-field select:focus {
    outline: none;
    border-color: #f4a261;
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.15);
}

/* Select dropdown arrow */
.acf-field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ==============================================
   9. ACF Checkbox & Radio Lists
   ============================================== */

.acf-field .acf-checkbox-list,
.acf-field .acf-radio-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.acf-field .acf-checkbox-list li,
.acf-field .acf-radio-list li {
    margin-bottom: 10px;
}

.acf-field .acf-checkbox-list li label,
.acf-field .acf-radio-list li label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.acf-field .acf-checkbox-list li label input[type="checkbox"],
.acf-field .acf-radio-list li label input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #f4a261;
    flex-shrink: 0;
}

.acf-field .acf-radio-list li label input[type="radio"] {
    width: 18px;
    height: 18px;
}

/* Consent checkbox caret icon */
.acf-field[data-name="consent_to_all"] ul.acf-checkbox-list label {
    display: flex;
    align-items: center;
}

.anf-consent-caret {
    cursor: pointer;
    margin-left: 8px;
    font-size: 14px;
    color: #666;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.anf-consent-caret:hover {
    color: #f4a261;
}

/* ==============================================
   10. Field Instructions & Descriptions
   ============================================== */

.acf-field .description {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

/* ==============================================
   11. Submit Button
   ============================================== */

.acf-form-submit {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
}

/* Hide ACF spinner and other non-button elements */
.acf-form-submit > *:not(button):not(input[type="submit"]) {
    display: none;
}

#ask-now-form .acf-form-submit input[type="submit"],
#ask-now-form .acf-form-submit button[type="submit"],
#ask-now-form .acf-form-submit .anf-submit-button,
#ask-now-form button.anf-submit-button {
    border: none;
    font-size: 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    padding: 0.625em 1.25em;
    cursor: pointer;
    background: linear-gradient(135deg, #f4a261, #e76f51);
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.3);
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.2;
}

#ask-now-form .acf-form-submit input[type="submit"]:hover,
#ask-now-form .acf-form-submit button[type="submit"]:hover,
#ask-now-form .acf-form-submit .anf-submit-button:hover,
#ask-now-form button.anf-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
    background: linear-gradient(135deg, #e76f51, #d8553f);
}

#ask-now-form .acf-form-submit input[type="submit"]:disabled,
#ask-now-form .acf-form-submit button[type="submit"]:disabled,
#ask-now-form .acf-form-submit .anf-submit-button:disabled,
#ask-now-form button.anf-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ==============================================
   12. Error States
   ============================================== */

.acf-field.anf-field-error input,
.acf-field.anf-field-error select,
.acf-field.anf-field-error textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.anf-error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    padding: 6px 10px;
    background-color: #fdf2f2;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

.anf-general-error {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background-color: #fdf2f2;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
}
