/* اصلاح موقعیت و ظاهر مودال گزارش */
.fap-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    /* مرکز چین کردن محتوا */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fap-modal-overlay.is-visible {
    display: flex !important;
    /* فعال شدن Flex برای مرکزچینی */
}

.fap-modal-content {
    background: #fff;
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    /* لبه‌های گرد مشابه بقیه مودال‌ها */
    padding: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    border: none;
}

/* هماهنگ کردن هدر */
.fap-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.fap-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #1e293b;
}

/* هماهنگ کردن دکمه‌ها با استایل فرمولا */
.fap-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.fap-modal-footer button {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-submit {
    background-color: #19A29A !important;
    /* رنگ سبز سازمانی شما */
    color: #fff !important;
}

.btn-submit:hover {
    background-color: #14857e !important;
    transform: translateY(-2px);
}

.btn-cancel {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
}

.btn-cancel:hover {
    background-color: #e2e8f0 !important;
}

/* استایل فیلد توضیحات مشابه اینپوت‌های سایت */
#fap-report-details {
    width: 100%;
    min-height: 100px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-top: 15px;
    background: #f8fafc;
    resize: none;
    outline: none;
}

#fap-report-details:focus {
    border-color: #19A29A !important;
    background: #fff !important;
}


/* --- استایل دکمه‌های رادیویی سفارشی در گزارش --- */

.fap-report-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fap-report-options label {
    display: flex !important;
    margin: 0px !important;
}

.custom-radio-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

/* مخفی کردن دایره زشت و اصلی مرورگر */
.custom-radio-btn input {
    display: none;
}

.custom-radio-btn .radio-label {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

/* دایره توخالی سفارشی (تیک) */
.custom-radio-btn .radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

/* حالت هاور */
.custom-radio-btn:hover {
    border-color: #19A29A;
    background: #f0fdfa;
}

/* --- حالت انتخاب شده (Checked) --- */

.custom-radio-btn input:checked+.radio-label {
    color: #19A29A;
}

.custom-radio-btn input:checked~.radio-mark {
    border-color: #19A29A;
    background: #19A29A;
}

/* ایجاد نقطه سفید داخل دایره وقتی انتخاب می‌شود */
.custom-radio-btn input:checked~.radio-mark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* تغییر رنگ بوردر کل باکس وقتی انتخاب می‌شود */
.custom-radio-btn:has(input:checked) {
    border-color: #19A29A;
    background: #f0fdfa;
    box-shadow: 0 0 0 3px rgba(25, 162, 154, 0.1);
}


/* --- سیستم نوتیفیکیشن (Toast) فرمولا --- */

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none
}

.input-wrapper,
.modal-option,
.toast,
.toast-content {
    display: flex;
    align-items: center
}

.toast {
    pointer-events: auto;
    min-width: 280px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .049);
    animation: .3s forwards slideInLeft;
    position: relative;
    border-right: 5px solid rgba(0, 0, 0, .049)
}

.close-modal path,
.close-modal svg,
.input-unit {
    pointer-events: none
}

.toast-content {
    gap: 10px
}

.toast-close {
    background: 0 0;
    border: none;
    color: #3c3c3c;
    font-size: 22px;
    margin-top: 5px;
    cursor: pointer;
    opacity: .7;
    transition: .2s;
    line-height: 1
}

.media-card:hover .overlay-actions,
.toast-close:hover {
    opacity: 1
}

.toast-close:hover {
    background-color: #158a8200;
}

div#notification-container {
    margin-top: 20px;
}

.toast-warning {
    background-color: #ffefbe;
    color: #333;
    border: 1px solid #ffc107
}

.toast-error {
    background-color: #ffced3;
    color: #333;
    border: 1px solid #dc3545
}

.toast-success {
    background-color: #cdffd8;
    color: #333;
    border: 1px solid #28a745
}

.toast-info {
    background-color: #cdf8ff;
    color: #333;
    border: 1px solid #17a2b8
}

@keyframes fadeInOverlay {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeOutOverlay {
    from {
        opacity: 1
    }

    to {
        opacity: 0
    }
}

@keyframes slideUpIn {
    from {
        transform: translateY(30px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

@keyframes slideDownOut {
    from {
        transform: translateY(0);
        opacity: 1
    }

    to {
        transform: translateY(30px);
        opacity: 0
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(100%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px)
    }
}

.toast.hide {
    animation: .5s forwards fadeOut
}


#ez-login-form {
    padding: 0px !important;
    margin: 0px !important;
    border-radius: 0px !important;
    box-shadow: none !important;
    border: none !important;
}

/* ======================================================
 *  دکمه قلب (علاقه‌مندی) در صفحه آگهی
 * ====================================================== */
#Like .elementor-button .elementor-button-icon svg {
    transition: fill .2s ease, transform .2s ease;
}

#Like .elementor-button:hover .elementor-button-icon svg {
    transform: scale(1.08);
}

#Like .elementor-button.is-favorited .elementor-button-icon svg {
    fill: #ef4444;
}

#Like .elementor-button.is-favorited .elementor-button-icon svg path {
    fill: #ef4444;
}

/* انیمیشن کوتاه هنگام افزودن */
#Like .elementor-button.is-favorited .elementor-button-icon {
    animation: fap-heart-pop .28s ease;
}

@keyframes fap-heart-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}


/* ======================================================
 *  صفحه علاقه‌مندی‌ها
 * ====================================================== */
.fap-favorites-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 12px;
    direction: rtl;
}

.fap-favorites-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.fap-favorites-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.fap-favorites-count {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 999px;
}

.fap-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.fap-favorite-card {
    position: relative;
}

.fap-fav-remove {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.fap-fav-remove:hover {
    transform: scale(1.06);
    background: #fef2f2;
    box-shadow: 0 4px 10px rgba(239,68,68,.18);
}

.fap-fav-remove:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.fap-favorites-empty {
    text-align: center;
    padding: 48px 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: #64748b;
}

.fap-favorites-empty svg {
    margin-bottom: 12px;
}

.fap-favorites-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #334155;
    font-weight: 700;
}

.fap-favorites-empty p {
    margin: 0;
    font-size: 13px;
}