/* KalCo Assistant: price history + price alerts demo (static/js/price-alerts.js) */
.kpa-pill { align-self: flex-start; border: 1px solid #c5a059; background: #fffaf0; color: #000; border-radius: 999px; padding: 0.55rem 1.1rem; font-size: 0.9rem; cursor: pointer; font-family: inherit; }
.kpa-pill:hover { background: #f5efe2; }
.kpa-pill.kpa-set { border-color: #137333; background: #e6f4ea; color: #137333; }
.kpa-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.kpa-history-link { color: #1a5fb4; font-size: 0.85rem; text-decoration: underline; cursor: pointer; margin-left: 0.6rem; font-weight: normal; background: none; border: 0; padding: 0; font-family: inherit; }
.kpa-was { text-decoration: line-through; color: #5a5a5a; font-weight: normal; margin-right: 0.5rem; }
.kpa-drop-tag { background: #d93025; color: #fff; font-size: 0.75rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 0.5rem; vertical-align: middle; }

/* Launchers + red dot */
.kpa-launcher { position: fixed; right: 24px; bottom: 24px; width: 58px; height: 58px; border-radius: 50%; background: #000; color: #c5a059; font-size: 26px; border: 0; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.3); z-index: 9000; display: flex; align-items: center; justify-content: center; }
.kpa-header-btn { position: relative; background: none; border: 0; font-size: 1.25rem; color: #c5a059; cursor: pointer; padding: 0 0.6rem; }
.kpa-dot { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #d93025; color: #fff; font-size: 12px; font-weight: 700; display: none; align-items: center; justify-content: center; border: 2px solid #fff; font-family: Helvetica, Arial, sans-serif; }
.kpa-header-btn .kpa-dot { top: -8px; right: -2px; min-width: 17px; height: 17px; font-size: 10px; border-width: 1.5px; }
.kpa-has-unseen .kpa-dot { display: flex; }
.kpa-has-unseen.kpa-launcher { animation: kpa-pulse 1.6s ease-out 3; }
@keyframes kpa-pulse { 0% { box-shadow: 0 0 0 0 rgba(217,48,37,.55); } 100% { box-shadow: 0 0 0 18px rgba(217,48,37,0); } }

/* Toast */
.kpa-toast { position: fixed; top: 84px; right: 24px; width: 360px; max-width: calc(100vw - 32px); background: #111; color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.35); z-index: 9500; cursor: pointer; transform: translateY(-20px); opacity: 0; transition: all .25s ease; font-size: 13px; line-height: 1.35; }
.kpa-toast.kpa-show { transform: none; opacity: 1; }
.kpa-toast img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.kpa-toast b { font-size: 14px; }
.kpa-toast .kpa-g { color: #81c995; }

/* Drawer */
.kpa-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 9100; display: none; }
.kpa-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; background: #fff; z-index: 9200; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease; box-shadow: -4px 0 20px rgba(0,0,0,.15); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #000; }
.kpa-open .kpa-drawer { transform: none; }
.kpa-open .kpa-backdrop { display: block; }
.kpa-dhdr { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #e5e5e5; font-size: 16px; }
.kpa-dhdr .kpa-star { color: #c5a059; }
.kpa-dhdr button { background: none; border: 0; font-size: 20px; cursor: pointer; }
.kpa-chat { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.kpa-u { align-self: flex-end; background: #f1f1f1; border-radius: 16px; padding: 8px 14px; font-size: 14px; max-width: 85%; }
.kpa-a { font-size: 14px; line-height: 1.45; }
.kpa-a ul { margin: 6px 0 0 18px; padding: 0; }
.kpa-muted { color: #5a5a5a; }
.kpa-ctx { display: flex; gap: 10px; align-items: center; border: 1px solid #e5e5e5; border-radius: 10px; padding: 8px; font-size: 13px; }
.kpa-ctx img, .kpa-row img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.kpa-tabs { display: flex; gap: 22px; font-size: 13px; border-bottom: 1px solid #e5e5e5; }
.kpa-tabs button { background: none; border: 0; padding: 6px 2px; color: #5a5a5a; cursor: pointer; font-family: inherit; font-size: 13px; }
.kpa-tabs button.kpa-on { color: #000; border-bottom: 2px solid #000; font-weight: 600; }
.kpa-chart { width: 100%; height: auto; display: block; }
.kpa-fine { font-size: 11px; color: #5a5a5a; }
.kpa-call { background: #f9f9f9; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.kpa-call .kpa-h { font-weight: 600; margin-bottom: 2px; }
.kpa-call.kpa-good .kpa-h { color: #137333; }
.kpa-btn { align-self: flex-start; background: #000; color: #fff; border: 0; border-radius: 999px; padding: 9px 18px; font-size: 13px; cursor: pointer; font-family: inherit; }
.kpa-chips { display: flex; flex-direction: column; gap: 8px; }
.kpa-chip { align-self: flex-start; background: #f5efe2; color: #5c4513; border: 0; border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; font-family: inherit; text-align: left; }
.kpa-chip:hover { background: #ece2cb; }
.kpa-chip.kpa-pri { background: #000; color: #fff; }
.kpa-card { border: 1px solid #e5e5e5; border-radius: 12px; padding: 12px; }
.kpa-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e5e5e5; font-size: 13px; }
.kpa-row:last-child { border-bottom: 0; }
.kpa-row .kpa-l { display: flex; gap: 10px; align-items: center; }
.kpa-row a { color: inherit; }
.kpa-tog { width: 34px; height: 20px; border-radius: 10px; background: #ccc; position: relative; border: 0; cursor: pointer; flex: none; }
.kpa-tog::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.kpa-tog.kpa-on { background: #137333; }
.kpa-tog.kpa-on::after { left: 16px; }
.kpa-drop { display: flex; gap: 12px; }
.kpa-drop img { width: 96px; height: 110px; border-radius: 8px; object-fit: cover; flex: none; }
.kpa-brand { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #5a5a5a; }
.kpa-now { font-size: 20px; font-weight: 600; }
.kpa-off { background: #d93025; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.kpa-input { border-top: 1px solid #e5e5e5; padding: 12px 18px 18px; display: flex; gap: 8px; }
.kpa-input input { flex: 1; border: 1px solid #ccc; border-radius: 999px; padding: 10px 16px; font-size: 14px; font-family: inherit; outline: none; }
.kpa-input button { background: #000; color: #fff; border: 0; border-radius: 999px; padding: 0 16px; cursor: pointer; }
.kpa-presenter { position: fixed; left: 16px; bottom: 16px; z-index: 9000; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; padding: 6px 10px; border-radius: 8px; font-family: Helvetica, Arial, sans-serif; display: none; }
.kpa-presenter.kpa-show { display: block; }
@media (max-width: 600px) { .kpa-drawer { width: 100vw; } .kpa-toast { top: 72px; right: 16px; } }
