@font-face {
  font-family: Alexandria;
  src: url('alexandria-arabic.woff2') format('woff2');
  font-display: swap;
}

:root { --navy: #111827; --teal: #14b8a6; --muted: #64748b; --border: #e5e7eb; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #eef3f5; color: var(--navy); font-family: Alexandria, Tahoma, sans-serif; }
button, textarea { font: inherit; }
.chat-shell { width: 100%; height: 100%; max-width: 680px; margin: 0 auto; background: white; display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden; }
.chat-header { display: flex; align-items: center; gap: 11px; padding: 15px 17px; color: white; background: linear-gradient(135deg, #111827, #134e4a); }
.assistant-avatar, .message-avatar { display: grid; place-items: center; border-radius: 13px; color: #063d37; background: #5eead4; font-weight: 800; }
.assistant-avatar { width: 42px; height: 42px; font-size: 20px; }
.chat-header > div:nth-child(2) { display: grid; gap: 4px; flex: 1; }
.chat-header strong { font-size: 13px; }
.chat-header span { font-size: 9px; color: #ccfbf1; }
.chat-header span i { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; background: #5eead4; }
.chat-header button { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.15); color: white; background: rgba(255,255,255,.08); border-radius: 10px; cursor: pointer; }
.messages { overflow-y: auto; padding: 20px 14px; background: radial-gradient(circle at 100% 0%, rgba(20,184,166,.05), transparent 18rem), #f8fafc; }
.message { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.user-message { justify-content: flex-start; }
.message-avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; flex: 0 0 auto; }
.bubble { max-width: min(82%, 480px); padding: 11px 13px; border-radius: 16px 16px 4px 16px; background: white; border: 1px solid var(--border); box-shadow: 0 6px 22px rgba(15,23,42,.05); font-size: 11px; line-height: 1.9; }
.user-message .bubble { color: white; background: #0f766e; border-color: #0f766e; border-radius: 16px 16px 16px 4px; }
.bubble a { display: inline-block; color: #0f766e; font-weight: 700; margin-top: 4px; }
.loading { display: flex; gap: 4px; padding: 15px; }
.loading i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: pulse 1s infinite alternate; }
.loading i:nth-child(2) { animation-delay: .2s; }
.loading i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { to { transform: translateY(-4px); opacity: .35; } }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 36px 18px 0; }
.suggestions button { border: 1px solid #99f6e4; color: #115e59; background: #f0fdfa; padding: 8px 10px; border-radius: 999px; font-size: 9px; cursor: pointer; }
.product-results { display: grid; gap: 8px; width: min(88%, 500px); margin: -6px 36px 16px 0; }
.product-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 13px; color: var(--navy); background: white; text-decoration: none; box-shadow: 0 6px 20px rgba(15,23,42,.04); }
.product-card img, .product-placeholder { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #eef3f5; }
.product-placeholder { display: grid; place-items: center; color: #0f766e; font-weight: 800; }
.product-card-info { min-width: 0; }
.product-card-info strong, .product-card-info small { display: block; }
.product-card-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.product-card-info small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.product-card-arrow { color: #0f766e; font-size: 18px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 11px 12px; border-top: 1px solid var(--border); background: white; }
.composer textarea { flex: 1; resize: none; max-height: 120px; border: 1px solid var(--border); background: #f8fafc; color: var(--navy); border-radius: 14px; padding: 11px 13px; outline: 0; font-size: 11px; line-height: 1.7; }
.composer textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,184,166,.1); }
.composer button { width: 42px; height: 42px; flex: 0 0 auto; border: 0; border-radius: 13px; color: #063d37; background: var(--teal); font-size: 19px; cursor: pointer; }
footer { padding: 0 12px 9px; text-align: center; color: var(--muted); background: white; font-size: 8px; }
footer strong { color: #0f766e; }
