/* Arvo Site - gallery and chat overlay - v1.1.0. Uses the colours from /style.css. */

/* Gallery (shop page) */
.shop-gallery .banner { background: #fff4dc; color: #8a5a00; border: 1px solid #f0dcae; border-radius: 8px; padding: 0.6rem 0.8rem; margin-bottom: 1rem; font-size: 0.85rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.art { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.art .pic { aspect-ratio: 1; background: var(--paper-deep); color: var(--accent); display: grid; place-items: center; }
.art .pic svg, .art .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art .body { padding: 0.75rem 0.85rem 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.art h3 { margin: 0; font-size: 1rem; }
.art p { margin: 0; font-size: 0.85rem; color: var(--faint); }
.art .row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding-top: 0.5rem; }
.art .price { font-size: 0.85rem; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 0.35rem 0.75rem; border: 0; border-radius: 6px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.btn:hover { filter: brightness(1.15); }
.ask-btn { font-size: 0.95rem; padding: 0.55rem 1rem; }

/* Status pill */
.pill { font-size: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--faint); white-space: nowrap; }
.pill.online { color: var(--accent); background: #e7efe9; border-color: #c9dccf; }
.pill.offline { color: var(--red); background: #fbeaea; border-color: #efc9c9; }
.pill.mock { color: #8a5a00; background: #fff4dc; border-color: #f0dcae; }

/* Floating button, bottom-right (Ko-fi's button sits bottom-left) */
.arvo-chat-btn {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 2147483000;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.1rem; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); cursor: pointer;
}
.arvo-chat-btn:hover { filter: brightness(1.12); }
.arvo-chat-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.arvo-chat-btn .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #b9b2a5; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6); }
.arvo-chat-btn .dot.online { background: #5fd38a; }
.arvo-chat-btn .dot.mock { background: #f0c050; }
body.chat-open .arvo-chat-btn { display: none; }

/* The panel over the page */
.arvo-chat-panel {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 2147483001;
  width: min(24rem, calc(100vw - 2rem)); height: min(38rem, calc(100vh - 2rem));
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); padding: 0.75rem;
}
.arvo-chat-panel[hidden] { display: none; }
.arvo-chat-head { display: flex; align-items: center; gap: 0.5rem; }
.arvo-chat-head h2 { margin: 0; font-size: 1.1rem; flex: 1; }
.arvo-chat-close { border: 0; background: none; font: inherit; font-size: 1.6rem; line-height: 1; color: var(--faint); cursor: pointer; padding: 0 0.25rem; }
.arvo-chat-close:hover { color: var(--ink); }
.arvo-chat-note { margin: 0.4rem 0 0.6rem; font-size: 0.75rem; }
.chat-slot { flex: 1; min-height: 0; display: flex; }
.chat-slot > * { flex: 1; }
.engine { margin: 0.4rem 0 0; font-size: 0.7rem; }
.engine:empty { display: none; }
/* Ko-fi's floating button would sit on top of the panel's message box */
body.chat-open [id^="kofi-wo-container"] { display: none !important; }

@media (max-width: 480px) {
  .arvo-chat-panel { inset: 0; width: auto; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
}

/* Plain fallback chat, used when Deep Chat cannot load */
.plain { border: 1px solid var(--line); border-radius: 10px; background: #fff; display: flex; flex-direction: column; min-height: 0; }
.plain .log { flex: 1; overflow-y: auto; padding: 0.85rem; display: flex; flex-direction: column; gap: 0.6rem; }
.plain .msg { max-width: 85%; padding: 0.5rem 0.75rem; border-radius: 10px; font-size: 0.95rem; overflow-wrap: anywhere; }
.plain .ai { background: var(--paper-deep); align-self: flex-start; }
.plain .user { background: var(--accent); color: #fff; align-self: flex-end; }
.plain .user a { color: #fff; }
.plain form { display: flex; gap: 0.5rem; padding: 0.6rem; border-top: 1px solid var(--line); }
.plain input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; }
.plain button { font: inherit; background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 0 0.9rem; cursor: pointer; }
.plain button:disabled { opacity: 0.5; cursor: default; }
