.hc-search {
    position: relative;
    width: 100%;
}

.hc-search-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: inherit;
    opacity: 0.85;
}

.hc-search-box {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 178, 2, 0.28);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.65rem 0.9rem;
}

.hc-search-light .hc-search-box {
    background: #fff;
    border-color: #dbe3ee;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.hc-search-box i {
    color: #ffb202;
    font-size: 1rem;
}

.hc-search-input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    color: inherit;
}

.hc-search-light .hc-search-input {
    color: #0f172a;
}

.hc-search-input::placeholder {
    color: rgba(148, 163, 184, 0.95);
}

.hc-search-clear {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
    padding: 0.15rem;
}

.hc-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 40;
    border-radius: 14px;
    border: 1px solid rgba(255, 178, 2, 0.22);
    background: #101015;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.hc-search-light .hc-search-panel {
    background: #fff;
    border-color: #dbe3ee;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.hc-search-status {
    padding: 0.7rem 0.95rem;
    font-size: 0.82rem;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hc-search-light .hc-search-status {
    color: #64748b;
    border-bottom-color: #e2e8f0;
}

.hc-search-results {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 360px;
    overflow-y: auto;
}

.hc-search-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    text-align: right;
    padding: 0.8rem 0.95rem;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
}

.hc-search-light .hc-search-item {
    border-bottom-color: #eef2f7;
}

.hc-search-item:hover,
.hc-search-item:focus {
    background: rgba(255, 178, 2, 0.08);
    outline: none;
}

.hc-search-item-section {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffb202;
    margin-bottom: 0.2rem;
}

.hc-search-item-title {
    display: block;
    font-size: 0.92rem;
    line-height: 1.6;
}

.hc-search-item-sub {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.7;
}

.hc-search-light .hc-search-item-sub {
    color: #64748b;
}

.hc-search-page-head {
    max-width: 760px;
}

.hp-search-wrap {
    margin: 0 auto 1.2rem;
    max-width: 760px;
}

.hp-search-wrap .hc-search {
    margin-top: 0.2rem;
}

.hc-search-highlight {
    animation: hc-search-pulse 1.6s ease;
}

@keyframes hc-search-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 178, 2, 0.45); }
    100% { box-shadow: 0 0 0 16px rgba(255, 178, 2, 0); }
}

/* Public ad on help product pages (light theme) */
.hp-body .ud-public-ad-v2 {
    padding: 1.5rem 0 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-top: 1px solid #e2e8f0;
}

.hp-body .ud-public-ad-card {
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 178, 2, 0.35);
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hp-body .ud-public-ad-card-link {
    cursor: pointer;
}

.hp-body .ud-public-ad-card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 178, 2, 0.65);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

.hp-body .ud-public-ad-card-static {
    cursor: default;
}

.hp-body .ud-public-ad-media {
    width: 200px;
    flex-shrink: 0;
    background: #f1f5f9;
}

.hp-body .ud-public-ad-media img {
    width: 100%;
    height: 100%;
    min-height: 130px;
    object-fit: cover;
    display: block;
}

.hp-body .ud-public-ad-body {
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hp-body .ud-public-ad-label {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    color: #101010;
    background: linear-gradient(135deg, #ffb202, #ff8a00);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 0.5rem;
}

.hp-body .ud-public-ad-title {
    margin: 0 0 0.35rem;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.55;
}

.hp-body .ud-public-ad-desc {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.75;
}

.hp-body .ud-public-ad-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.65rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: #d97706;
}

@media (max-width: 768px) {
    .hp-body .ud-public-ad-card {
        flex-direction: column;
    }

    .hp-body .ud-public-ad-media {
        width: 100%;
    }
}

/* Dark theme ad link affordance on main site */
.ud-public-ad-card-link {
    cursor: pointer;
}

.ud-public-ad-cta i {
    font-size: 1rem;
}

/* Help center chat widget */
.hc-chat {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1200;
    font-family: "Vazirmatn", system-ui, sans-serif;
    transform-origin: left bottom;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.hc-chat-is-open {
    transform: none !important;
    opacity: 1 !important;
}

.hc-chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
}

.hp-body .hc-chat-backdrop {
    background: rgba(15, 23, 42, 0.35);
}

.hc-chat-body-lock {
    overflow: hidden;
}

.hc-chat[hidden],
.hc-chat-panel[hidden],
.hc-chat-backdrop[hidden] {
    display: none !important;
}

.hc-chat-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #101015;
    box-shadow: 0 14px 30px rgba(255, 178, 2, 0.35);
    cursor: pointer;
    overflow: hidden;
}

.hc-chat:not(.hc-chat-is-open) .hc-chat-toggle {
    animation: none;
}

.hc-chat-is-wandering .hc-chat-toggle-ring {
    animation-play-state: paused;
}

.hc-aibegim-logo {
    display: block;
    object-fit: contain;
    border-radius: 50%;
}

.hc-chat-toggle-icon {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    z-index: 2;
}

.hc-chat-toggle-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 178, 2, 0.55);
    animation: hc-chat-pulse 2.4s ease-out infinite;
    z-index: 1;
}

.hc-chat-toggle-ring-2 {
    animation-delay: 1.2s;
}

.hc-chat-is-open .hc-chat-toggle {
    animation: none;
    transform: scale(0.96);
}

.hc-chat-teaser {
    position: absolute;
    left: 76px;
    bottom: 12px;
    max-width: min(240px, calc(100vw - 110px));
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 3;
}

.hc-chat-teaser.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hc-chat-teaser-btn {
    display: block;
    width: 100%;
    border: 1px solid rgba(255, 178, 2, 0.35);
    border-radius: 14px 14px 14px 4px;
    background: #101015;
    color: #f8fafc;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.7;
    text-align: right;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    cursor: pointer;
}

.hp-body .hc-chat-teaser-btn {
    background: #fff;
    color: #0f172a;
    border-color: #dbe3ee;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.hc-chat-teaser-btn:hover {
    border-color: rgba(255, 178, 2, 0.65);
}

.hc-chat-is-open .hc-chat-teaser {
    display: none;
}

.hc-chat-header-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hc-chat-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255, 178, 2, 0.35);
    background: #101015;
}

.hc-chat-avatar-icon {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes hc-chat-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes hc-chat-pulse {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    70% {
        transform: scale(1.22);
        opacity: 0;
    }
    100% {
        transform: scale(1.22);
        opacity: 0;
    }
}

@keyframes hc-chat-mic {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@keyframes hc-chat-glow {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.45; }
}

.hc-chat-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 12px);
    width: min(360px, calc(100vw - 36px));
    height: 520px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 178, 2, 0.28);
    background: #101015;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

.hp-body .hc-chat-panel {
    background: #fff;
    border-color: #dbe3ee;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.hc-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-body .hc-chat-header {
    border-bottom-color: #e2e8f0;
}

.hc-chat-title {
    display: block;
    font-size: 0.95rem;
}

.hc-chat-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.hp-body .hc-chat-subtitle {
    color: #64748b;
}

.hc-chat-close {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}

.hc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: rtl;
    scrollbar-width: thin;
    scrollbar-color: #ffb202 rgba(255, 178, 2, 0.12);
}

.hc-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.hc-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 178, 2, 0.08);
    border-radius: 999px;
}

.hc-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffb202, #ff8a00);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.hc-chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffc233, #ff9a1a);
    background-clip: padding-box;
}

.hp-body .hc-chat-messages {
    scrollbar-color: #ff8a00 rgba(255, 138, 0, 0.14);
}

.hp-body .hc-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 138, 0, 0.1);
}

.hp-body .hc-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffb202, #e69500);
    background-clip: padding-box;
}

.hc-chat-message {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 92%;
    text-align: right;
}

.hc-chat-message-user {
    align-self: flex-start;
    align-items: flex-start;
}

.hc-chat-message-bot {
    align-self: flex-end;
    align-items: flex-end;
}

.hc-chat-bubble {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.86rem;
    line-height: 1.8;
}

.hc-chat-message-user .hc-chat-bubble {
    background: linear-gradient(135deg, #ffb202, #ff8a00);
    color: #101010;
    border-bottom-left-radius: 6px;
}

.hc-chat-message-bot .hc-chat-bubble {
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    border-bottom-right-radius: 6px;
}

.hp-body .hc-chat-message-bot .hc-chat-bubble {
    background: #f1f5f9;
    color: #0f172a;
}

.hc-chat-typing {
    display: inline-flex;
    align-items: center;
    min-width: 52px;
    min-height: 20px;
    padding: 12px 14px;
}

.hc-chat-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hc-chat-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffb202;
    opacity: 0.45;
    animation: hc-chat-typing-dot 1.2s ease-in-out infinite;
}

.hc-chat-typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.hc-chat-typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

.hp-body .hc-chat-typing-dots span {
    background: #b45309;
}

@keyframes hc-chat-typing-dot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.hc-chat-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hc-chat-source {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 178, 2, 0.12);
    color: #ffb202;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.hp-body .hc-chat-source {
    background: rgba(255, 178, 2, 0.14);
    color: #b45309;
}

.hc-chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px 10px;
}

.hc-chat-cooldown {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 178, 2, 0.35);
    background: rgba(255, 178, 2, 0.12);
    color: #ffb202;
    font-size: 0.8rem;
    line-height: 1.7;
}

.hp-body .hc-chat-cooldown {
    background: rgba(255, 178, 2, 0.14);
    color: #b45309;
}

.hc-chat-cooldown[hidden] {
    display: none !important;
}

.hc-chat-form-cooldown {
    opacity: 0.72;
}

.hc-chat-form-cooldown .hc-chat-input {
    cursor: not-allowed;
}

.hc-chat-quick-btn {
    border: 1px solid rgba(255, 178, 2, 0.28);
    background: transparent;
    color: inherit;
    border-radius: 999px;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 0.74rem;
    cursor: pointer;
}

.hc-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-body .hc-chat-form {
    border-top-color: #e2e8f0;
}

.hc-chat-input {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: #101015;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.86rem;
    padding: 10px 12px;
    outline: none;
    caret-color: #f8fafc;
}

.hc-chat-input::placeholder {
    color: #94a3b8;
}

.hc-chat-input:focus {
    border-color: rgba(255, 178, 2, 0.45);
    background: #101015;
    color: #f8fafc;
}

.hc-chat-input:-webkit-autofill,
.hc-chat-input:-webkit-autofill:hover,
.hc-chat-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #101015 inset;
    -webkit-text-fill-color: #f8fafc;
    caret-color: #f8fafc;
}

.hp-body .hc-chat-input {
    border-color: rgba(255, 255, 255, 0.12);
    background: #101015;
    color: #f8fafc;
}

.hc-chat-send {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffb202, #ff8a00);
    color: #101010;
    cursor: pointer;
}

.hc-chat-send:disabled,
.hc-chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .hc-chat {
        left: 12px;
        bottom: 12px;
    }

    .hc-chat-is-open .hc-chat-toggle {
        display: none;
    }

    .hc-chat-is-open .hc-chat-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: min(86vh, 620px);
        max-height: 86vh;
        border-radius: 18px 18px 0 0;
    }

    .hc-chat-panel {
        width: calc(100vw - 24px);
        height: min(70vh, 520px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hc-chat {
        transition: none;
    }

    .hc-chat-toggle-ring {
        animation: none;
    }
}
