/* Package bot ("חבילה אישית"): opened from real buttons (home hero + header), not a floating chip.
   A side sheet on desktop (start side = right in RTL), a full-screen sheet on phones. B-he look: white, cobalt, Rubik.
   Uses the site tokens, so the dark toggle works too. */
html.bot-off [data-bot-open] { display: none !important; }
html.bot-lock { overflow: hidden; }

/* Entry buttons */
.btn.bot-cta { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 2px var(--brand); }
.btn.bot-cta:hover { background: var(--brand); color: #fff; filter: none; }
.bot-spark { flex: none; }
.head-cta .head-bot { display: inline-flex; align-items: center; gap: 6px; font: 600 16px/1 "Rubik", sans-serif; color: var(--brand-text); background: var(--brand-soft);
  border: 0; border-radius: 10px; padding: 11px 14px; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--brand); }
.head-cta .head-bot:hover { background: var(--brand); color: #fff; }
@media (max-width: 760px) { .head-cta { gap: 8px; } .head-cta .nav-btn, .head-cta .theme-btn { white-space: nowrap; } .head-cta .head-bot { padding: 9px; } .head-cta .head-bot span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
html[data-theme="dark"] .btn.bot-cta, html[data-theme="dark"] .head-cta .head-bot { color: #c7d6ff; }
html[data-theme="dark"] .btn.bot-cta:hover, html[data-theme="dark"] .head-cta .head-bot:hover { color: #fff; }

/* Sheet */
.bot[hidden] { display: none; }
.bot { position: fixed; inset: 0; z-index: 70; font: 400 17px/1.5 "Rubik", "Heebo", Arial, sans-serif; }
.bot-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .38); animation: bot-fade .18s ease-out; }
.bot-panel { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(440px, 100vw); display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); box-shadow: 0 0 60px rgba(17, 24, 39, .28); animation: bot-in .22s ease-out; }
@keyframes bot-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bot-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bot-panel, .bot-backdrop { animation: none; } }

.bot-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 18px; background: linear-gradient(135deg, #1d4ed8, #3b6cff); color: #fff; }
.bot-avatar { flex: none; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; color: #fff; }
.bot-titles { flex: 1; min-width: 0; }
.bot-head h2 { margin: 0; font: 700 21px/1.25 "Rubik", sans-serif; color: #fff; }
.bot-head p { margin: 4px 0 0; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .92); }
.bot-close { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.bot-close:hover { background: rgba(255, 255, 255, .28); }
.bot-close:focus-visible { outline-color: #fff; }

.bot-log { flex: 1; overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; background: var(--soft); }
.bot-demo { margin: 0; padding: 8px 12px; border-radius: 12px; background: #fff4d6; color: #5c3b00; font-size: 14px; flex: none; }
html[data-theme="dark"] .bot-demo { background: #3a2c08; color: #ffe7a3; }
.bot-msg { max-width: 88%; padding: 11px 15px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16.5px; }
.bot-ai { align-self: flex-start; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-start-start-radius: 6px; }
.bot-me { align-self: flex-end; background: var(--brand); color: #fff; border-start-end-radius: 6px; }
.bot-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.bot-chip { font: 500 15px/1 "Rubik", sans-serif; color: var(--brand-text); background: var(--card); border: 1.5px solid var(--brand); border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.bot-chip:hover { background: var(--brand); color: #fff; }

.bot-status { margin: 0; padding: 8px 20px 0; font-size: 15px; color: var(--muted); background: var(--bg); }
.bot-status:empty { display: none; }
.bot-form { padding: 12px 20px 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; background: var(--bg); }
.bot-input { display: flex; align-items: flex-end; gap: 8px; border: 1.5px solid #9aa1aa; border-radius: 16px; padding: 6px; background: var(--card); }
.bot-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, .18); }
.bot-input textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font: 400 17px/1.45 "Rubik", "Heebo", sans-serif; padding: 8px 10px; min-height: 48px; max-height: 140px; }
.bot-send { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.bot-send:hover { filter: brightness(1.08); }
.bot-send:disabled, .bot-input textarea:disabled { opacity: .5; cursor: not-allowed; }
.bot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bot-new { background: none; border: 0; padding: 4px 0; min-height: 32px; color: var(--brand-text); font: 500 14.5px/1 "Rubik", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.bot-count { font-size: 13.5px; color: var(--muted); }
.bot-privacy { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Package card */
.bot-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: var(--card); box-shadow: var(--shadow); display: grid; gap: 10px; }
.bot-card h3 { margin: 0; font-size: 19px; }
.bot-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bot-lines li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.bot-lines b { white-space: nowrap; color: var(--ink); font-size: 17px; }
.bot-c a { font-weight: 700; }
.bot-c p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.bot-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.bot-link { background: none; border: 0; padding: 4px 0; min-height: 32px; color: var(--brand-text); text-decoration: underline; text-underline-offset: .18em; font: 500 14.5px/1.2 "Rubik", sans-serif; cursor: pointer; }
.bot-note { display: block; font-size: 14px; margin: 0; }
.bot-sum { display: grid; gap: 2px; }
.bot-sum .row { display: flex; justify-content: space-between; font-size: 16px; }
.bot-sum .disc { color: var(--ok); }
.bot-sum .total { font-weight: 800; font-size: 20px; color: var(--ink); }
.bot-add { display: grid; gap: 4px; font-size: 15px; }
.bot-add select { font: 400 16px "Rubik", sans-serif; min-height: 42px; border-radius: 10px; border: 1px solid #9aa1aa; background: var(--bg); color: var(--text); padding: 0 8px; }
.bot-go { text-align: center; width: 100%; }

@media (max-width: 520px) {
  .bot-panel { width: 100vw; }
  .bot-head { padding: 16px; }
  .bot-log, .bot-form { padding-inline: 16px; }
}
@media print { .bot { display: none; } }
@media (max-width: 380px) { .head-cta { gap: 6px; } .head-cta .nav-btn { padding: 10px 10px; } .head-cta .theme-btn { padding-inline: 10px; } }
