@keyframes ta-dots {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    40% { opacity: 0.2; }
    100% { opacity: 0.2; }
}
#ta-typing-indicator span:last-child {
    animation: ta-dots 1.2s steps(4, end) infinite;
    display: inline-block;
    min-width: 20px;
}

@keyframes ta-blink-green {
    0% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 12px rgba(76, 175, 80, 0.8); }
    100% { opacity: 0.3; transform: scale(0.8); }
}
.ta-online-dot {
    animation: ta-blink-green 1.2s ease-in-out infinite !important;
}

@keyframes ta-blink-red {
    0% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 12px rgba(244, 67, 54, 0.8); }
    100% { opacity: 0.3; transform: scale(0.8); }
}
.ta-offline-dot {
    animation: ta-blink-red 1.2s ease-in-out infinite !important;
}

@keyframes ta-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.ta-cursor {
    animation: ta-cursor-blink 0.7s step-end infinite;
    display: inline-block;
    font-weight: 100;
    margin-right: 2px;
}

/* سه نوع ویبره */
@keyframes ta-vibrate-normal {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(-5deg); }
    20% { transform: rotate(5deg); }
    30% { transform: rotate(-4deg); }
    40% { transform: rotate(4deg); }
    50% { transform: rotate(-3deg); }
    60% { transform: rotate(3deg); }
    70% { transform: rotate(-2deg); }
    80% { transform: rotate(2deg); }
    90% { transform: rotate(-1deg); }
    100% { transform: rotate(0deg); }
}
.ta-vibrate-normal {
    animation: ta-vibrate-normal 0.5s ease-in-out;
    animation-iteration-count: infinite;
    animation-delay: 1s;
    transform-origin: center;
}

@keyframes ta-vibrate-strong {
    0% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(-12deg) scale(1.05); }
    20% { transform: rotate(12deg) scale(1.05); }
    30% { transform: rotate(-10deg) scale(1.04); }
    40% { transform: rotate(10deg) scale(1.04); }
    50% { transform: rotate(-8deg) scale(1.03); }
    60% { transform: rotate(8deg) scale(1.03); }
    70% { transform: rotate(-5deg) scale(1.02); }
    80% { transform: rotate(5deg) scale(1.02); }
    90% { transform: rotate(-2deg) scale(1.01); }
    100% { transform: rotate(0deg) scale(1); }
}
.ta-vibrate-strong {
    animation: ta-vibrate-strong 0.4s ease-in-out;
    animation-iteration-count: infinite;
    animation-delay: 0.8s;
    transform-origin: center;
}

@keyframes ta-vibrate-pulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.08) rotate(-3deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.08) rotate(3deg); }
    100% { transform: scale(1); }
}
.ta-vibrate-pulse {
    animation: ta-vibrate-pulse 1s ease-in-out;
    animation-iteration-count: infinite;
    animation-delay: 0.5s;
    transform-origin: center;
}

/* چشمک‌زن پیام خطا */
@keyframes ta-blink-error {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}
.ta-error-blink {
    animation: ta-blink-error 0.6s ease-in-out 3 !important;
    border-color: #f44336 !important;
    background: #ffebee !important;
    color: #b71c1c !important;
}

.ta-messenger-buttons a {
    display: inline-flex !important;
    align-items: center !important;
    padding: 5px 12px !important;
    background: #2e7d32 !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-size: 12px !important;
    transition: 0.2s !important;
    gap: 6px !important;
    border: 1px solid #2e7d32 !important;
    font-weight: bold !important;
}
.ta-messenger-buttons a:hover {
    transform: scale(1.05) !important;
    opacity: 0.85 !important;
}
.ta-messenger-buttons a img {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

@keyframes ta-flash-error {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.02); }
}
#ta-error-flash {
    animation: ta-flash-error 0.8s infinite alternate;
}

@keyframes ta-waiting-pulse {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.7; transform: scale(1); }
}
.ta-waiting-message {
    animation: ta-waiting-pulse 1s ease-in-out infinite !important;
    border-right: 4px solid #ff9800 !important;
    background: #fff3e0 !important;
}

.ta-social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.ta-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    transition: 0.2s;
    text-decoration: none;
}
.ta-social-icons a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}
.ta-social-icons a img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.ta-expert-circle.selected {
    border-color: #2e7d32 !important;
    background-color: #e8f5e9 !important;
}
.ta-expert-circle.disabled {
    pointer-events: none !important;
    opacity: 0.5 !important;
}