/* FinoTicket L11 — tenant demo styles
 *
 * IMPORTANT: this file is deliberately HOSTILE toward the embed.
 *
 * A real tenant site will have its own resets, its own button styles, and its
 * own font choices. If any of that leaks into the console, customers see a
 * broken UI. These rules exist to prove the Shadow DOM boundary holds:
 *
 *   * { font-family: ... }        — a global font that would ruin the console
 *   button { all: unset }         — the classic destructive reset
 *   button, input { border-radius: 0 !important }
 *   h1, h2, p { color: ... }      — a global colour scheme
 *
 * If the Console still looks correct on support.html, isolation is real.
 */

/* --- Aggressive global reset that must NOT reach the shadow root --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Times New Roman', Georgia, serif !important;
}

button,
input,
select,
textarea {
  all: unset;
  border-radius: 0 !important;
  font: inherit;
}

h1,
h2,
h3 {
  color: #b91c1c !important;
  border-bottom: 3px dashed #b91c1c;
  padding-bottom: 4px;
}

a {
  color: #b45309;
  text-decoration: underline wavy;
}

/* --- A bright, opinionated shop theme --- */
:root {
  --aftab-sun: #f59e0b;
  --aftab-ink: #1f2937;
  --aftab-paper: #fffbeb;
  --aftab-green: #15803d;
}

body {
  margin: 0;
  background: var(--aftab-paper);
  color: var(--aftab-ink);
  line-height: 1.7;
}

/* --- Chrome --- */
.cart {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 16px;
  z-index: 40;
}

.cart > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--aftab-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(21, 128, 61, 0.35);
  cursor: pointer;
}

.site-header {
  background: #fff;
  border-bottom: 2px solid #fde68a;
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--aftab-ink);
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--aftab-sun);
  border-radius: 10px;
  font-size: 20px;
}

.site-nav {
  display: flex;
  gap: 6px;
  margin-inline-start: auto;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--aftab-ink);
  text-decoration: none;
  font-size: 14px;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: #fef3c7;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

/* --- Buttons the tenant owns (aggressively unstyled above) --- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  border: none;
  background: var(--aftab-sun);
  color: #111827;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none !important;
}

.btn--ghost {
  background: #fff;
  border: 2px solid var(--aftab-sun);
}

.btn--green {
  background: var(--aftab-green);
  color: #fff;
}

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 40px;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: 34px;
  line-height: 1.35;
  margin: 0 0 12px;
}

.hero p {
  font-size: 17px;
  margin: 0 0 22px;
}

.hero__art {
  height: 220px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 72px;
  background: repeating-linear-gradient(45deg, #fef3c7, #fef3c7 14px, #fde68a 14px, #fde68a 28px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.card {
  background: #fff;
  border: 2px solid #fde68a;
  border-radius: 14px;
  padding: 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  border: none !important;
  color: var(--aftab-ink) !important;
  padding: 0 !important;
}

.card p {
  margin: 0;
  font-size: 14px;
}

.product {
  background: #fff;
  border: 2px solid #fde68a;
  border-radius: 14px;
  overflow: hidden;
}

.product__thumb {
  height: 130px;
  display: grid;
  place-items: center;
  font-size: 46px;
  background: #fef9c3;
}

.product__body {
  padding: 14px;
}

.product__price {
  font-weight: 800;
  color: var(--aftab-green);
  margin-top: 6px;
}

/* --- The embed host container --- */
.console-shell {
  background: #fff;
  border: 2px solid #fde68a;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
}

.console-shell__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fef3c7;
  border-bottom: 2px solid #fde68a;
  flex-wrap: wrap;
}

.console-shell__title {
  font-weight: 700;
  font-size: 15px;
}

.console-shell__body {
  min-height: 560px;
}

/* --- The protocol log (proves the handshake happened) --- */
.proto-log {
  background: #1f2937;
  color: #d1fae5;
  border-radius: 12px;
  padding: 14px 16px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.8;
  max-height: 190px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.proto-log__empty {
  color: #9ca3af;
}

.proto-log__badge {
  display: inline-block;
  background: #065f46;
  color: #ecfdf5;
  border-radius: 4px;
  padding: 0 6px;
  margin-inline-end: 6px;
}

.demo-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.host-toast {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 16px;
  z-index: 50;
  background: #111827;
  color: #f9fafb;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.host-toast[data-visible='true'] {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  border-top: 2px solid #fde68a;
  padding: 24px 20px 40px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.muted {
  color: #6b7280;
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill[data-state='ok'] {
  background: #dcfce7;
  color: #166534;
}

.status-pill[data-state='idle'] {
  background: #e5e7eb;
  color: #374151;
}
