.smart-assistant-root {
    bottom: 22px;
    font-family: Cairo, Tajawal, Tahoma, Arial, sans-serif;
    left: 24px;
    position: fixed;
    right: auto;
    z-index: 1080;
}

.smart-assistant-root[dir="ltr"] {
    left: auto;
    right: 24px;
}

.smart-assistant-toggle {
    align-items: center;
    background: #0f766e;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
}

.smart-assistant-toggle:hover,
.smart-assistant-toggle:focus {
    background: #115e59;
    color: #fff;
    outline: none;
}

.smart-assistant-toggle-icon {
    align-items: center;
    background: rgba(255, 255, 255, .16);
    border-radius: 50%;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.smart-assistant-panel {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .45);
    border-radius: 8px;
    bottom: 58px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .2);
    display: none;
    overflow: hidden;
    position: absolute;
    left: 0;
    right: auto;
    width: min(420px, calc(100vw - 32px));
}

.smart-assistant-root[dir="ltr"] .smart-assistant-panel {
    left: auto;
    right: 0;
}

.smart-assistant-root.is-open .smart-assistant-panel {
    display: block;
}

.smart-assistant-header {
    align-items: center;
    background: #10233f;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 13px 14px;
}

.smart-assistant-header strong {
    display: block;
    font-size: 14px;
    line-height: 1.45;
}

.smart-assistant-header span {
    color: #cbd5e1;
    display: block;
    font-size: 11px;
    line-height: 1.5;
}

.smart-assistant-close {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 0;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.smart-assistant-body {
    background: #f8fafc;
    display: grid;
    gap: 10px;
    max-height: 430px;
    min-height: 260px;
    overflow: auto;
    padding: 12px;
}

.smart-assistant-message {
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.8;
    max-width: 92%;
    padding: 10px 12px;
    white-space: pre-line;
}

.smart-assistant-message.is-assistant {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .35);
    color: #1f2937;
    justify-self: start;
}

.smart-assistant-message.is-user {
    background: #0f766e;
    color: #fff;
    justify-self: end;
}

.smart-assistant-root[dir="ltr"] .smart-assistant-message.is-assistant {
    justify-self: start;
}

.smart-assistant-root[dir="ltr"] .smart-assistant-message.is-user {
    justify-self: end;
}

.smart-assistant-cards {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.smart-assistant-card {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 8px;
    padding: 10px;
}

.smart-assistant-card span {
    color: #64748b;
    display: block;
    font-size: 11px;
    line-height: 1.5;
}

.smart-assistant-card strong {
    color: #10233f;
    display: block;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.6;
}

.smart-assistant-actions,
.smart-assistant-suggestions,
.smart-assistant-followups {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.smart-assistant-actions a,
.smart-assistant-suggestions button,
.smart-assistant-followups button {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    min-height: 32px;
    padding: 7px 10px;
}

.smart-assistant-actions a {
    background: #0f766e;
    color: #fff;
}

.smart-assistant-actions a:hover,
.smart-assistant-actions a:focus {
    background: #115e59;
    color: #fff;
}

.smart-assistant-suggestions button {
    background: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, .35);
    color: #334155;
}

.smart-assistant-suggestions button:hover,
.smart-assistant-suggestions button:focus {
    background: #dbeafe;
    color: #1d4ed8;
    outline: none;
}

.smart-assistant-followups button {
    background: #fff7ed;
    border: 1px solid rgba(251, 146, 60, .45);
    color: #9a3412;
}

.smart-assistant-followups button:hover,
.smart-assistant-followups button:focus {
    background: #ffedd5;
    color: #7c2d12;
    outline: none;
}

.smart-assistant-loading {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.smart-assistant-form {
    align-items: center;
    background: #fff;
    border-top: 1px solid rgba(148, 163, 184, .35);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
}

.smart-assistant-form input {
    border: 1px solid rgba(148, 163, 184, .55);
    border-radius: 8px;
    color: #10233f;
    font-size: 13px;
    height: 38px;
    padding: 7px 10px;
    width: 100%;
}

.smart-assistant-form input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, .12);
    outline: none;
}

.smart-assistant-form button {
    align-items: center;
    background: #10233f;
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
}

.smart-assistant-form button:disabled {
    cursor: wait;
    opacity: .72;
}

@media (max-width: 575px) {
    .smart-assistant-root,
    .smart-assistant-root[dir="ltr"] {
        bottom: 14px;
        left: 12px;
        right: 12px;
    }

    .smart-assistant-toggle {
        justify-content: center;
        width: 100%;
    }

    .smart-assistant-panel,
    .smart-assistant-root[dir="ltr"] .smart-assistant-panel {
        bottom: 58px;
        left: 0;
        right: 0;
        width: 100%;
    }
}
