﻿/* ============================================================================
   MTheme/css/cta.css
   ----------------------------------------------------------------------------
   مدال/بانر CTA — نسخهٔ قابل‌مدیریت از پنل ادمین (/AdminCta).
   پالت برند هرکجا: سبز #006a0d + اکسن #ee8d1a — سفید و مینیمال، RTL.

   ⚠️ پیشوند کلاس‌ها hzcta- است تا با مدال مشاورهٔ موجود (.hzcm-*) تداخل نکند.
   ⚠️ حالت ۳ از خود مدال موجود سایت (#hzcmBackdrop) استفاده می‌کند و اینجا
      استایلی ندارد.
   ============================================================================ */

.hzcta-bd {
    position: fixed;
    inset: 0;
    z-index: 9450;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(16, 26, 40, .5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity .26s ease;
    direction: rtl;
}
.hzcta-bd[hidden] { display: none; }
.hzcta-bd.is-open { opacity: 1; }

.hzcta {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 80px -20px rgba(16, 26, 40, .45);
    overflow: hidden;
    transform: translateY(16px) scale(.97);
    transition: transform .3s cubic-bezier(.2, .8, .3, 1);
    font-family: inherit;
}
.hzcta-bd.is-open .hzcta { transform: translateY(0) scale(1); }

/* ---------- دکمهٔ بستن ---------- */
.hzcta-x {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, .88);
    color: #475569;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(16, 26, 40, .14);
    transition: all .16s;
}
.hzcta-x:hover { background: #ffe4e6; color: #be123c; }

/* ---------- هدر ---------- */
.hzcta-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 14px;
    background: linear-gradient(150deg, rgba(0, 106, 13, .08), rgba(238, 141, 26, .08));
}
.hzcta-ico {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 19px;
    background: linear-gradient(135deg, #006a0d, #ee8d1a);
    box-shadow: 0 8px 20px -8px rgba(0, 106, 13, .6);
}
.hzcta-head-txt { min-width: 0; }
.hzcta-head-txt h3 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 800;
    color: #16283f;
    line-height: 1.6;
}
.hzcta-head-txt p {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.9;
}

/* ---------- بدنه ---------- */
.hzcta-body { padding: 6px 22px 4px; overflow-y: auto; flex: 1 1 auto; }

.hzcta-text {
    font-size: 13px;
    color: #475569;
    line-height: 2;
    margin: 6px 0 14px;
    white-space: pre-line;
}

/* ---------- فیلدها ---------- */
.hzcta-field { margin-bottom: 13px; }
.hzcta-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}
.hzcta-field label span { color: #e11d48; }
.hzcta-field input,
.hzcta-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e6eaf1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
    color: #16283f;
}
.hzcta-field input:focus,
.hzcta-field textarea:focus {
    outline: none;
    border-color: #006a0d;
    box-shadow: 0 0 0 3px rgba(0, 106, 13, .1);
}
.hzcta-field textarea { min-height: 74px; resize: vertical; }

/* ---------- دکمه‌ها ---------- */
.hzcta-foot {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 14px 22px 20px;
}
.hzcta-btn {
    flex: 1 1 auto;
    padding: 11px 18px;
    border-radius: 11px;
    border: 0;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none !important;
    transition: transform .16s, box-shadow .16s, opacity .16s;
}
.hzcta-btn-main {
    color: #fff;
    background: linear-gradient(135deg, #006a0d, #ee8d1a);
    box-shadow: 0 10px 24px -12px rgba(0, 106, 13, .85);
}
.hzcta-btn-main:hover { transform: translateY(-1px); color: #fff; }
.hzcta-btn-main:disabled { opacity: .6; cursor: default; transform: none; }
.hzcta-btn-ghost {
    flex: 0 0 auto;
    background: #f1f5f9;
    color: #475569;
}
.hzcta-btn-ghost:hover { background: #e2e8f0; color: #16283f; }

/* ---------- حالت ۴: زنگ بزنید ---------- */
.hzcta-call {
    text-align: center;
    padding: 4px 22px 0;
}
.hzcta-call-ico {
    width: 76px;
    height: 76px;
    margin: 2px auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    background: linear-gradient(135deg, #006a0d, #2f9a41);
    box-shadow: 0 0 0 10px rgba(0, 106, 13, .08);
    animation: hzctaPulse 2.2s ease-in-out infinite;
}
@keyframes hzctaPulse {
    0%, 100% { box-shadow: 0 0 0 8px rgba(0, 106, 13, .08); }
    50%      { box-shadow: 0 0 0 16px rgba(0, 106, 13, .05); }
}
.hzcta-call-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #16283f;
    margin: 0 0 6px;
    line-height: 1.7;
}
.hzcta-call-num {
    display: block;
    direction: ltr;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #006a0d;
    text-decoration: none !important;
    margin: 4px 0 2px;
}
.hzcta-call-num:hover { text-decoration: underline !important; }
.hzcta-call-hint { font-size: 12px; color: #94a3b8; margin: 10px 0 0; }

/* ---------- حالت ۵: عنوان + لینک ---------- */
.hzcta-link-card {
    display: block;
    padding: 14px 16px;
    border: 1px solid #e6eaf1;
    border-radius: 13px;
    background: #f8fafc;
    text-decoration: none !important;
    transition: all .18s;
    cursor: pointer;
}
.hzcta-link-card:hover { border-color: #006a0d; background: #fff; transform: translateY(-1px); }
.hzcta-link-card strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #16283f;
    margin-bottom: 4px;
}
.hzcta-link-card span { font-size: 12px; color: #64748b; line-height: 1.9; display: block; }
.hzcta-link-card i { color: #006a0d; margin-inline-start: 4px; }

/* ---------- حالت ۷: تصویر ---------- */
.hzcta-img-wrap {
    padding: 0;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    display: block;
    background: #f1f5f9;
}
.hzcta-img-wrap img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 62vh;
    object-fit: cover;
    transition: transform .4s;
}
.hzcta-img-wrap:hover img { transform: scale(1.02); }

/* ---------- پیام ---------- */
.hzcta-msg {
    font-size: 12.5px;
    line-height: 1.9;
    padding: 9px 12px;
    border-radius: 10px;
    margin: 4px 0 12px;
    display: none;
}
.hzcta-msg.is-ok { display: block; background: #dcfce7; color: #166534; }
.hzcta-msg.is-err { display: block; background: #ffe4e6; color: #be123c; }

/* ---------- موبایل ---------- */
@media (max-width: 560px) {
    .hzcta-bd { padding: 0; align-items: flex-end; }
    .hzcta {
        max-width: 100%;
        max-height: 88vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }
    .hzcta-bd.is-open .hzcta { transform: translateY(0); }
    .hzcta-head { padding: 18px 18px 12px; }
    .hzcta-body { padding: 6px 18px 4px; }
    .hzcta-foot { padding: 12px 18px 18px; flex-wrap: wrap; }
    .hzcta-call { padding: 4px 18px 0; }
    .hzcta-img-wrap { border-radius: 20px 20px 0 0; }
}

/* ---------- وقتی مدال CTA باز است، اسکرول قفل می‌شود ---------- */
body.hzcta-open { overflow: hidden; }
