#psp-contact-widget {
    position: fixed;
    inset-inline-start: 16px;
    bottom: 16px;
    z-index: 9999;
    font-family: inherit;
    color: #1e293b;
}

/* فاصله بیشتر در موبایل تا روی ناوبری نیفته */
@media (max-width: 768px) {
    #psp-contact-widget {
        bottom: 80px;
    }
}

/* دکمه استیکی */
.psp-contact-toggle {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.psp-contact-toggle-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15,23,42,0.25);
    border: 1px solid #e2e8f0;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.psp-contact-toggle:hover .psp-contact-toggle-inner {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(15,23,42,0.32);
    background: #f8fafc;
}

.psp-contact-toggle-circle {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #00b2d9, #0093c3);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,178,217,0.55);
    flex-shrink: 0;
}

.psp-contact-toggle-circle i {
    font-size: 18px;
}

.psp-contact-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.psp-contact-toggle-text-top {
    font-size: 11px;
    color: #64748b;
}

.psp-contact-toggle-text-main {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.psp-contact-toggle-chevron {
    font-size: 12px;
    color: #94a3b8;
    margin-inline-start: 2px;
    transition: transform .18s ease, color .18s ease;
}

.psp-contact-toggle.is-open .psp-contact-toggle-chevron {
    transform: rotate(180deg);
    color: #0f172a;
}

/* پالس روی دایره آبی */
.psp-contact-toggle.psp-pulse .psp-contact-toggle-circle {
    animation: psp-pulse 1.7s infinite;
}

@keyframes psp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,178,217,0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(0,178,217,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,178,217,0); }
}

/* انیمیشن وایبل + شاین برای جلب توجه */
.psp-contact-toggle.psp-attention .psp-contact-toggle-inner {
    animation: psp-wiggle 2.2s ease-in-out infinite;
}

@keyframes psp-wiggle {
    0%   { transform: translateY(0) rotate(0deg); }
    10%  { transform: translateY(-2px) rotate(-2deg); }
    20%  { transform: translateY(0) rotate(2deg); }
    30%  { transform: translateY(-1px) rotate(-1deg); }
    40%  { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.psp-contact-toggle.psp-attention .psp-contact-toggle-text-main {
    background: linear-gradient(120deg, #0f172a, #00b2d9, #0f172a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% 100%;
    animation: psp-shimmer 2.2s linear infinite;
}

@keyframes psp-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 480px) {
    /* دکمه فقط دایره با آیکون بشه */
    .psp-contact-toggle-inner {
        padding: 6px;
        border-radius: 999px;
    }

    /* متن و فلش روی موبایل کامل مخفی */
    .psp-contact-toggle-text,
    .psp-contact-toggle-chevron {
        display: none;
    }

    /* خود دایره روی موبایل کمی بزرگ‌تر برای تاچ راحت‌تر */
    .psp-contact-toggle-circle {
        width: 44px;
        height: 44px;
    }
}

/* پنل اصلی */
.psp-contact-panel {
    position: absolute;
    inset-inline-start: 0;
    bottom: 74px;
    width: 340px;
    max-height: 72vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.35);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease;
}

.psp-contact-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.psp-contact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f1fbff;
    border-bottom: 1px solid #dbeafe;
}

.psp-contact-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.psp-contact-logo-text {
    font-weight: 700;
    font-size: 14px;
    color: #00a4cf;
    display: flex;
    align-items: center;
    gap: 6px;
}

.psp-contact-logo-text i {
    font-size: 18px;
}

.psp-contact-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
}

.psp-contact-close:hover {
    color: #0f172a;
}

.psp-contact-body {
    padding: 10px 14px 12px;
    max-height: calc(72vh - 48px);
    overflow-y: auto;
}

.psp-contact-title {
    margin: 0 0 8px;
    font-size: 13px;
    color: #6b7280;
}

.psp-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.psp-contact-item {
    border-radius: 10px;
    padding: 8px 9px;
    transition: background .12s ease, box-shadow .12s ease, transform .12s ease;
}

.psp-contact-item + .psp-contact-item {
    margin-top: 4px;
}

.psp-contact-item:hover {
    background: #f9fafb;
    box-shadow: 0 6px 14px rgba(148,163,184,0.35);
    transform: translateY(-1px);
}

.psp-contact-dep-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.psp-contact-dep-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f7fd;
    color: #0284c7;
    flex-shrink: 0;
}

.psp-contact-dep-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.psp-contact-dep-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.psp-contact-dep-sub {
    font-size: 12px;
    color: #6b7280;
}

.psp-contact-actions {
    display: flex;
    gap: 6px;
}

.psp-contact-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.psp-contact-call {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
}

.psp-contact-call i {
    color: #00a4cf;
}

.psp-contact-wa {
    background: #22c55e;
    color: #f9fafb;
    border-color: #16a34a;
}

.psp-contact-wa i {
    font-size: 14px;
}

.psp-contact-btn:hover {
    filter: brightness(1.05);
}

@media (max-width: 480px) {
    .psp-contact-panel {
        width: 300px;
    }
}
