.sm-assist {
    position: fixed;
    z-index: 320;
    left: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    direction: ltr;
    font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}
.sm-assist-panel {
    direction: rtl;
    width: min(380px, calc(100vw - 28px));
    max-height: min(560px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    background: #fffaf2;
    color: #3d0d16;
    border: 1px solid rgba(201, 162, 39, .55);
    border-radius: 22px;
    box-shadow: 0 22px 50px rgba(61, 13, 22, .28);
    overflow: hidden;
}
.sm-assist-panel[hidden] { display: none !important; }
.sm-assist-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
    background: linear-gradient(135deg, #3d0d16, #6d1b2a 60%, #8a3140);
    color: #fffaf2;
}
.sm-assist-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 250, 242, .14);
    border: 1px solid rgba(201, 162, 39, .8);
    color: #c9a227;
    flex: 0 0 auto;
}
.sm-assist-head strong { display: block; font-size: 16px; }
.sm-assist-head small { display: block; opacity: .85; font-size: 12px; }
.sm-assist-close {
    margin-right: auto;
    margin-left: 0;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fffaf2;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.sm-assist-log {
    flex: 1 1 auto;
    overflow: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
}
.sm-assist-msg {
    max-width: 92%;
    padding: 10px 12px;
    border-radius: 16px;
    line-height: 1.7;
    font-size: 14.5px;
    white-space: pre-wrap;
}
.sm-assist-msg.bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #ead7b8;
    border-bottom-right-radius: 4px;
}
.sm-assist-msg.user {
    align-self: flex-end;
    background: #6d1b2a;
    color: #fffaf2;
    border-bottom-left-radius: 4px;
}
.sm-assist-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sm-assist-links a {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff6e4;
    color: #6d1b2a;
    font-weight: 800;
    font-size: 12.5px;
    text-decoration: none;
    border: 1px solid rgba(201, 162, 39, .45);
}
.sm-assist-links a:hover { background: #6d1b2a; color: #fffaf2; }
.sm-assist-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 12px 10px;
}
.sm-assist-chips button {
    flex: 0 0 auto;
    border: 1px solid rgba(109, 27, 42, .25);
    background: #fff;
    color: #6d1b2a;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}
.sm-assist-chips button:hover { background: #6d1b2a; color: #fffaf2; }
.sm-assist-form {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px;
}
.sm-assist-form input {
    flex: 1;
    border: 1px solid #ead7b8;
    border-radius: 999px;
    padding: 10px 14px;
    font: inherit;
    color: #3d0d16;
    background: #fff;
    outline: none;
}
.sm-assist-form input:focus { border-color: #6d1b2a; }
.sm-assist-form button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #6d1b2a;
    color: #fffaf2;
    cursor: pointer;
}
.sm-assist-form button:disabled { opacity: .55; cursor: default; }
.sm-assist-launch {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 0 8px 0 16px;
    height: 62px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d1b2a, #3d0d16);
    color: #fffaf2;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(61, 13, 22, .35);
    direction: rtl;
}
.sm-assist-launch-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 250, 242, .12);
    border: 1px solid rgba(201, 162, 39, .85);
    color: #c9a227;
    font-size: 18px;
}
.sm-assist-launch-text { font-weight: 800; font-size: 15px; padding-right: 4px; }
.sm-assist.is-open .sm-assist-launch-text { display: none; }
.sm-assist.is-open .sm-assist-launch { padding: 0; width: 62px; justify-content: center; }
.sm-assist-dots { display: inline-flex; gap: 4px; }
.sm-assist-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6d1b2a;
    display: block;
    animation: sm-assist-dot 1s infinite ease-in-out;
}
.sm-assist-dots i:nth-child(2) { animation-delay: .15s; }
.sm-assist-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sm-assist-dot {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}
@media (max-width: 640px) {
    .sm-assist { left: 12px; bottom: 12px; }
    .sm-assist-launch-text { display: none; }
    .sm-assist-launch { width: 62px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .sm-assist-dots i { animation: none; }
}
