/* Home page showcase (trivus-storefront.js: discordMessageHtml, showcaseRowsHtml, showcaseHeroHtml).
   Messages use Discord's dark colours and layout; the frame, glow and settings card use the TRIVUS charcoal and mint. */
:root {
  --tvd-window: #1b1d21;
  --tvd-window-line: #2a2f33;
  --tvd-text: #dbdee1;
  --tvd-strong: #f2f3f5;
  --tvd-muted: #949ba4;
  --tvd-embed: #232428;
  --tvd-field: #b5bac1;
  --tvd-blurple: #5865f2;
  --tvd-mention-bg: rgba(88, 101, 242, .28);
  --tvd-mention: #c9cdfb;
  --tvd-button: #4e5058;
  --tvd-select: #111214;
}

/* ── Discord window and message ─────────────────────────────────────────────── */
.tvd-window {
  position: relative; min-width: 0;
  border: 1px solid var(--tvd-window-line); border-radius: 16px; overflow: hidden;
  background: var(--tvd-window); color: var(--tvd-text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(159, 220, 200, .04);
  font-size: 15px; line-height: 1.375; text-align: start;
}
.tvd-channel {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--tvd-window-line); color: var(--tvd-strong); font-weight: 600; font-size: 14px;
}
.tvd-channel span { color: var(--tvd-muted); font-size: 20px; font-weight: 400; line-height: 1; }
.tvd-messages { display: grid; gap: 14px; padding: 16px 16px 18px; }
.tvd-message { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
.tvd-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #2b2d31; }
.tvd-body { display: grid; gap: 6px; min-width: 0; justify-items: start; }
.tvd-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; line-height: 1.2; }
.tvd-head strong { color: var(--tvd-strong); font-size: 15px; font-weight: 600; }
.tvd-head time { color: var(--tvd-muted); font-size: 12px; }
.tvd-app {
  display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 4px;
  background: var(--tvd-blurple); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em; line-height: 15px;
}
.tvd-app svg { width: 12px; height: 12px; fill: currentColor; }
.tvd-content { color: var(--tvd-text); overflow-wrap: anywhere; }
.tvd-content b { color: var(--tvd-strong); }
.tvd-mention { padding: 0 2px; border-radius: 3px; background: var(--tvd-mention-bg); color: var(--tvd-mention); font-weight: 500; white-space: nowrap; }

.tvd-embed {
  display: grid; gap: 8px; width: 100%; max-width: 440px; padding: 12px 16px 14px;
  border-radius: 4px; background: var(--tvd-embed);
  border-inline-start: 4px solid var(--t-accent, #9fdcc8);
}
.tvd-embed[data-tone="danger"] { border-inline-start-color: #e5484d; }
.tvd-embed-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--tvd-strong); }
.tvd-embed-author img { border-radius: 50%; }
.tvd-embed-title { color: var(--tvd-strong); font-weight: 700; font-size: 15px; }
.tvd-embed-text { color: var(--tvd-text); font-size: 14px; }
.tvd-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.tvd-field { display: grid; gap: 2px; grid-column: 1 / -1; font-size: 14px; min-width: 0; }
.tvd-field.inline { grid-column: auto; }
.tvd-field strong { color: var(--tvd-strong); font-size: 13px; }
.tvd-field span { color: var(--tvd-field); overflow-wrap: anywhere; }
.tvd-embed-footer { color: var(--tvd-muted); font-size: 12px; }
.tvd-image { display: block; width: 100%; max-width: 460px; height: auto; border-radius: 8px; }
.tvd-window.tall .tvd-image { max-width: 380px; }

.tvd-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.tvd-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 0 14px; border-radius: 8px;
  background: var(--tvd-button); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.tvd-button.primary { background: var(--tvd-blurple); }
.tvd-button.wide { width: 100%; }
.tvd-select {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 440px; min-height: 40px; padding: 0 12px; border-radius: 8px;
  background: var(--tvd-select); border: 1px solid #2b2d31; color: var(--tvd-muted); font-size: 14px;
}
.tvd-select svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── TRIVUS settings card (floats over the window) ───────────────────────────── */
.tvd-settings {
  width: min(340px, 100%); padding: 14px 16px 16px; border-radius: 14px; text-align: start;
  border: 1px solid color-mix(in srgb, var(--t-accent, #9fdcc8) 35%, transparent);
  background: rgba(16, 20, 22, .94); backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.tvd-settings-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #22292c; }
.tvd-settings-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--t-accent, #9fdcc8) 14%, transparent); color: var(--t-accent, #9fdcc8); }
.tvd-settings-icon svg { width: 20px; height: 20px; }
.tvd-settings-head div { display: grid; gap: 2px; min-width: 0; }
.tvd-settings-head strong { color: #e8eceb; font-size: 14px; }
.tvd-settings-head small { color: #8e979a; font-size: 12px; }
.tvd-toggle { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--t-accent, #9fdcc8); }
.tvd-toggle::after { content: ''; position: absolute; top: 3px; inset-inline-end: 3px; width: 16px; height: 16px; border-radius: 50%; background: #0b1a16; }
.tvd-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; }
.tvd-settings-grid label { display: grid; gap: 6px; font-size: 12px; color: #8e979a; }
.tvd-settings-grid b { display: flex; align-items: center; justify-content: center; min-height: 36px; border-radius: 9px; border: 1px solid #262d31; background: #0f1315; color: #e8eceb; font-weight: 600; font-size: 13px; }

/* ── Showcase rows ──────────────────────────────────────────────────────────── */
.tvd-showcase { display: grid; gap: clamp(72px, 9vw, 120px); width: min(1180px, calc(100% - 32px)); margin: clamp(56px, 8vw, 96px) auto; }
.tvd-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(32px, 6vw, 80px); }
.tvd-row.reverse .tvd-copy { order: 2; }
.tvd-copy { display: grid; gap: 14px; justify-items: start; }
.tvd-copy h2 { margin: 0; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.15; color: #fff; }
.tvd-copy .tv-lead { margin: 0; }
.tvd-points { list-style: none; display: grid; gap: 10px; margin: 4px 0 6px; padding: 0; }
.tvd-points li { display: flex; align-items: center; gap: 10px; color: #c7cecf; font-size: 15px; }
.tvd-points svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--t-accent, #9fdcc8); }
.tvd-visual { position: relative; min-width: 0; }
.tvd-visual::before {
  content: ''; position: absolute; inset: 8% 6%; z-index: -1; border-radius: 40px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--t-accent, #9fdcc8) 14%, transparent), transparent);
}
.tvd-stack { display: grid; gap: 0; }
.tvd-stack .tvd-settings { margin-top: -28px; margin-inline-start: auto; margin-inline-end: -12px; position: relative; }

/* ── Custom bot profiles ────────────────────────────────────────────────────── */
.tvd-profiles { position: relative; display: grid; justify-items: center; padding: 8px 0 28px; }
.tvd-profile {
  position: relative; width: min(300px, 86%); border-radius: 14px; overflow: hidden;
  background: #232428; border: 1px solid #2f3136; box-shadow: 0 26px 60px rgba(0, 0, 0, .5); z-index: 2;
}
.tvd-profile.back { position: absolute; top: 34px; inset-inline-start: 6%; z-index: 1; transform: rotate(-4deg) scale(.92); opacity: .75; }
.tvd-profile-banner { height: 96px; background: url('/assets/brand/trivus-banner.webp') center / cover, linear-gradient(135deg, #0f2a26, #9fdcc8); }
.tvd-profile:not(.back) .tvd-profile-banner { background: radial-gradient(circle at 30% 30%, #f5c451, transparent 55%), linear-gradient(135deg, #8e4ec6, #e93d82); }
.tvd-profile-avatar { position: absolute; top: 52px; inset-inline-start: 16px; width: 80px; height: 80px; border-radius: 50%; border: 6px solid #232428; background: #111; }
.tvd-online { position: absolute; top: 110px; inset-inline-start: 76px; width: 18px; height: 18px; border-radius: 50%; background: #23a55a; border: 4px solid #232428; }
.tvd-profile-body { display: grid; gap: 6px; padding: 46px 16px 16px; }
.tvd-profile-body small { color: var(--tvd-muted); }
.tvd-profile-body p { margin: 4px 0 8px; color: var(--tvd-text); font-size: 14px; }

/* Real custom bots: up to four profile cards side by side. */
.tvd-bot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 4px 0 8px; }
.tvd-bot-grid.single { grid-template-columns: minmax(0, 300px); justify-content: center; }
.tvd-bot-grid .tvd-profile { width: 100%; }
.tvd-bot-grid .tvd-profile-banner[style] { background-size: cover; background-position: center; }
.tvd-profile-server { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--tvd-text); font-size: 13px; }
.tvd-profile-server img { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; }
.tvd-profile-server span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tvd-profile-server small { margin-inline-start: auto; white-space: nowrap; }

/* Tickets: the panel's drop-down shown open. */
.tvd-select.open { border-color: var(--tvd-blurple); border-bottom-left-radius: 0; border-bottom-right-radius: 0; color: var(--tvd-text); }
.tvd-select.open svg { transform: rotate(180deg); }
.tvd-menu { display: grid; width: 100%; max-width: 440px; margin-top: -4px; padding: 4px; border: 1px solid #2b2d31; border-top: 0; border-radius: 0 0 8px 8px; background: var(--tvd-select); }
.tvd-menu-option { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; }
.tvd-menu-option.active { background: rgba(255, 255, 255, .06); }
.tvd-menu-option strong { display: block; color: var(--tvd-strong); font-size: 14px; font-weight: 600; }
.tvd-menu-option small { display: block; color: var(--tvd-muted); font-size: 12px; }
.tvd-menu-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: color-mix(in srgb, var(--t-accent, #9fdcc8) 14%, transparent); color: var(--t-accent, #9fdcc8); }
.tvd-menu-icon svg { width: 18px; height: 18px; }

/* Welcome: switch between the card designs. */
.tvd-welcome-switch { display: grid; gap: 14px; }
.tvd-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tvd-swatches button { display: grid; gap: 6px; padding: 6px; border-radius: 12px; border: 1px solid #262d31; background: #121618; color: #c7cecf; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .2s, transform .2s; }
.tvd-swatches button:hover { transform: translateY(-2px); }
.tvd-swatches button[aria-selected="true"] { border-color: var(--t-accent, #9fdcc8); color: #fff; }
.tvd-swatches img { width: 100%; height: auto; aspect-ratio: 5 / 2; object-fit: cover; border-radius: 8px; }

/* ── Phones and tablets ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .tvd-row { grid-template-columns: 1fr; gap: 28px; }
  .tvd-row.reverse .tvd-copy { order: 0; }
  .tvd-stack .tvd-settings { margin-inline: auto; }
}
@media (max-width: 520px) {
  .tvd-window { font-size: 14px; border-radius: 12px; }
  .tvd-messages { padding: 12px; }
  .tvd-message { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .tvd-avatar { width: 34px; height: 34px; }
  .tvd-fields { grid-template-columns: 1fr 1fr; }
  .tvd-button { padding: 0 10px; font-size: 13px; }
  .tvd-bot-grid { grid-template-columns: 1fr; }
  .tvd-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
