/* مساعد تراتيل: زر شفاف بنسبة ٧٠٪ على يسار الشاشة، ونافذة محادثة أنيقة. يعمل فوق المتجر الكلاسيكي والموقع السينمائي. */
.tc-btn { position: fixed; z-index: var(--tc-z, 70); left: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tc-bottom, 96px)); width: auto; min-width: 64px; height: auto; padding: 6px 8px 5px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2); display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; -webkit-tap-highlight-color: transparent; opacity: .82; transition: opacity .3s, transform .2s, background .25s; box-shadow: 0 6px 20px rgba(60, 40, 120, .12); }
.tc-btn:hover, .tc-btn:focus-visible { opacity: 1; background: rgba(255, 255, 255, .3); outline: none; }
.tc-btn:active { transform: scale(.95); }
.tc-btn .tc-robot { width: 44px; height: 44px; object-fit: contain; display: block; filter: drop-shadow(0 2px 6px rgba(80, 60, 200, .25)); animation: tcWave 6s ease-in-out infinite; transform-origin: 50% 90%; }
.tc-btn .tc-lbl { font-family: 'Noto Naskh Arabic', 'Taratil Sans Arabic', serif; font-weight: 700; font-size: 13px; line-height: 1.25; white-space: nowrap; background: linear-gradient(90deg, #12c8f0, #5b8cff 50%, #9a52ff); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .9; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .55)); }
.tc-btn .tc-lbl bdi { font-family: 'Taratil Sans Arabic', system-ui, sans-serif; font-weight: 600; letter-spacing: .5px; }
@keyframes tcWave { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-7deg); } 90% { transform: rotate(6deg); } 95% { transform: rotate(-3deg); } }
.tc-btn.tc-hide { opacity: 0; pointer-events: none; transform: scale(.85); }
/* وميض أنيق كل ٣٠ ثانية: هالة زرقاء بنفسجية تتسع وتذوب، والروبوت يضيء لحظة. يبدأ بعد ٥ ثوانٍ من الظهور */
.tc-btn::after { content: ""; position: absolute; inset: -2px; border-radius: 20px; pointer-events: none; opacity: 0; animation: tcBlink 30s ease-in-out 5s infinite; }
@keyframes tcBlink {
  0%, 7%, 100% { opacity: 0; box-shadow: 0 0 0 0 rgba(91, 140, 255, 0), 0 0 0 0 rgba(154, 82, 255, 0); }
  1.5% { opacity: 1; box-shadow: 0 0 0 2px rgba(91, 140, 255, .65), 0 0 18px 4px rgba(154, 82, 255, .45); }
  3.5% { opacity: .9; box-shadow: 0 0 0 7px rgba(91, 140, 255, 0), 0 0 30px 10px rgba(154, 82, 255, .12); }
  5% { opacity: 1; box-shadow: 0 0 0 2px rgba(18, 200, 240, .55), 0 0 16px 3px rgba(91, 140, 255, .4); }
}
.tc-btn .tc-robot { animation: tcWave 6s ease-in-out infinite, tcGlow 30s ease-in-out 5s infinite; }
@keyframes tcGlow {
  0%, 7%, 100% { filter: drop-shadow(0 2px 6px rgba(80, 60, 200, .25)); }
  1.5%, 5% { filter: drop-shadow(0 0 10px rgba(91, 140, 255, .85)) brightness(1.18); }
}

.tc-panel { position: fixed; z-index: 85; left: 0; right: 0; bottom: 0; height: min(78svh, 640px); background: #fff; color: #15110d; border-radius: 22px 22px 0 0; box-shadow: 0 -16px 50px rgba(30, 20, 8, .28); display: flex; flex-direction: column; font-family: 'Taratil Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif; transform: translateY(102%); transition: transform .38s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.tc-panel.on { transform: none; }
@media (min-width: 700px) { .tc-panel { left: 16px; right: auto; bottom: 16px; width: 390px; height: 600px; border-radius: 22px; transform: translateY(20px); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s; } .tc-panel.on { transform: none; opacity: 1; pointer-events: auto; } }
.tc-scrim { position: fixed; inset: 0; z-index: 84; background: rgba(20, 14, 8, .3); opacity: 0; transition: opacity .3s; }
.tc-scrim.on { opacity: 1; }
@media (min-width: 700px) { .tc-scrim { background: transparent; } }

.tc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid #efe6d8; }
.tc-av { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #e7d9bf; background: #fffaf1; display: flex; align-items: center; justify-content: center; flex: none; }
.tc-av img { width: 26px; height: auto; }
.tc-who { flex: 1; min-width: 0; }
.tc-who b { display: block; font-family: 'Noto Naskh Arabic', serif; font-weight: 600; font-size: 17px; line-height: 1.35; }
.tc-who span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #6c5a47; }
.tc-who span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5ea36a; }
.tc-x { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; font-size: 24px; color: #6c5a47; cursor: pointer; }
.tc-x:hover { background: #faf5ec; }

.tc-body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: linear-gradient(180deg, #fffdf9, #fff 40%); }
.tc-m { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; animation: tcIn .28s ease; }
@keyframes tcIn { from { opacity: 0; transform: translateY(6px); } }
.tc-m.a { align-self: flex-start; background: #fbf5ea; border: 1px solid #f0e3cb; border-start-start-radius: 6px; }
.tc-m.u { align-self: flex-end; background: #15110d; color: #fff; border-end-end-radius: 6px; }
.tc-m.err { align-self: center; background: #fff; border: 1px dashed #e0cfb2; color: #6c5a47; font-size: 13.5px; text-align: center; }
.tc-refs { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 6px; margin-top: -2px; max-width: 90%; }
.tc-refs button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border-radius: 99px; border: 1px solid #e3d2b3; background: #fff; color: #15110d; font: 500 13px 'Taratil Sans Arabic', system-ui, sans-serif; cursor: pointer; }
.tc-refs button::after { content: "←"; color: #a7834a; }
[dir="ltr"] .tc-refs button::after { content: "→"; }
.tc-typing { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; border-radius: 18px; background: #fbf5ea; border: 1px solid #f0e3cb; }
.tc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #c2a170; animation: tcDot 1.1s infinite ease-in-out; }
.tc-typing i:nth-child(2) { animation-delay: .15s; } .tc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tcDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.tc-note { text-align: center; font-size: 11.5px; color: #8a7764; margin: 2px 0 4px; }

.tc-foot { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #efe6d8; background: #fff; }
.tc-in { flex: 1; min-height: 46px; max-height: 120px; resize: none; border: 1px solid #e3d6c0; border-radius: 23px; padding: 11px 16px; font: 400 16px/1.5 'Taratil Sans Arabic', system-ui, sans-serif; color: #15110d; background: #fff; }
.tc-in:focus { outline: 2px solid #eedcb8; border-color: #a7834a; }
.tc-send { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: #15110d; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .2s, transform .15s; }
.tc-send:disabled { opacity: .35; }
.tc-send:active { transform: scale(.94); }
.tc-send svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .tc-send svg { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { .tc-btn::after { animation: none !important; } .tc-panel, .tc-m, .tc-btn, .tc-btn .tc-robot, .tc-scrim { transition: none !important; animation: none !important; } .tc-typing i { animation: none; } }

/* بطاقات العطور تحت رد الإيجنت */
.tc-cards { align-self: stretch; display: flex; flex-direction: column; gap: 8px; margin-top: -2px; }
.tc-card { display: flex; gap: 12px; align-items: stretch; padding: 8px; border: 1px solid #ecdfc8; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(60, 40, 10, .06); animation: tcIn .28s ease; }
.tc-pic { flex: none; width: 76px; height: 92px; padding: 0; border: 0; border-radius: 12px; background: #faf4ea; overflow: hidden; cursor: pointer; }
.tc-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tc-ci { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tc-ci b { font-family: 'Noto Naskh Arabic', serif; font-weight: 600; font-size: 15.5px; line-height: 1.4; }
.tc-pr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; font-size: 13.5px; color: #15110d; }
.tc-ml { color: #6c5a47; }
.tc-now { font-weight: 600; }
.tc-was { color: #9a8670; font-size: 12.5px; }
.tc-free { align-self: flex-start; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: #eef7ee; color: #2f6b3a; border: 1px solid #cfe6d1; }
.tc-sold { align-self: flex-start; font-size: 12.5px; color: #8a7764; margin-top: auto; }
.tc-buy { align-self: flex-start; margin-top: auto; min-height: 36px; padding: 6px 16px; border: 0; border-radius: 99px; background: #15110d; color: #fff; font: 600 13.5px 'Taratil Sans Arabic', system-ui, sans-serif; cursor: pointer; }
.tc-buy:active { transform: scale(.96); }
.tc-card.sold .tc-pic img { filter: grayscale(1); opacity: .75; }
@media (prefers-reduced-motion: reduce) { .tc-card { animation: none; } }
