/*
File Name: aca-gravity-ux.css
 */
/* =========================================================
   Gravity Form UX Enhancement
   فرم تماس با ما
========================================================= */

.gravity-contact-us-form {
    position: relative;
}

/* حالت کلی لودینگ */
.gravity-contact-us-form.aca-gf-section-loading {
    pointer-events: none;
}

/* دکمه در حال ارسال */
.contact-us-gform .aca-gf-btn-loading,
.contact-us-gform input[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* لایه لودینگ */
.aca-gf-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    z-index: 20;
    border-radius: 20px;
}

.gravity-contact-us-form.aca-gf-section-loading .aca-gf-overlay {
    display: flex;
}

.aca-gf-overlay__box {
    min-width: 220px;
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
    text-align: center;
}

.aca-gf-overlay__text {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #112337;
}

/* اسپینر ساده */
.aca-gf-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto;
    border: 3px solid #f1cbb5;
    border-top-color: var(--primary-color, #F07020);
    border-radius: 50%;
    animation: acaGfSpin 0.8s linear infinite;
}

@keyframes acaGfSpin {
    to {
        transform: rotate(360deg);
    }
}

/* پیام موفقیت */
.aca-gf-success-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: #f4fbf6;
    border: 1px solid #cdebd5;
}

.aca-gf-success-box__icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #22a35a;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.aca-gf-success-box__content h3 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
    color: #112337;
}

.aca-gf-success-box__content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: #4e5b6b;
}

/* خطاهای اعتبارسنجی کمی واضح‌تر */
#gform_wrapper_2.gform_validation_error {
    animation: acaGfShake 0.25s ease-in-out 2;
}

@keyframes acaGfShake {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-3px); }
    50%  { transform: translateX(3px); }
    75%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

#gform_confirmation_wrapper_2 {
    margin-top: 24px;
}

.aca-gf-native-success {
    padding: 32px 24px;
    border: 1px solid #dbe9dd;
    border-radius: 20px;
    background: #f4fbf6;
    text-align: center;
}

.aca-gf-native-success__icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #22a35a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
}

.aca-gf-native-success h3 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.3;
    color: #112337;
}

.aca-gf-native-success p {
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
    color: #5a6675;
}

/* ================================
   Success Final (Custom)
================================ */

.aca-gf-success-final {
    text-align: center;
    padding: 40px 24px;
    border-radius: 20px;
    background: #f4fbf6;
    border: 1px solid #cdebd5;
    margin-top: 20px;
}

.aca-gf-success-final__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #22a35a;
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aca-gf-success-final h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #112337;
}

.aca-gf-success-final p {
    font-size: 15px;
    color: #5a6675;
    margin-bottom: 20px;
    line-height: 1rem;
}

/* دکمه reset */
.aca-gf-reset-btn {
    background: #204ce5;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

.aca-gf-reset-btn:hover {
    background: #173cc2;
}

button.aca-gf-reset-btn {
    width: auto;
}
/* =========================================
   Front Validation Error State
========================================= */

.aca-gf-field-error input,
.aca-gf-field-error textarea,
.aca-gf-field-error select {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.15);
}

.aca-gf-inline-error {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #d63638;
}

/* حالت دکمه غیرفعال */
.contact-us-gform input[type="submit"]:disabled,
.contact-us-gform button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}