/* Tillpress interactive demo — Harbor ticket desk. Demo host only. */

body.tpid-sim .wp-block-post-title,
body.tpid-sim .entry-title {
  display: none !important;
}
body.tpid-sim .wp-site-blocks .entry-content,
body.tpid-sim .wp-block-post-content {
  max-width: none;
  padding-inline: 0;
}

.tpid-root {
  --ink: #10212b;
  --navy: #071824;
  --channel: #0e3d48;
  --fog: #d7eef1;
  --cyan: #5ec8d0;
  --brass: #c49a3c;
  --ticket: #f3f7f4;
  --paper: #eef6f4;
  --warn: #c45c26;
  --good: #2f8f6b;
  --bad: #b4232c;
  --line: rgba(16, 33, 43, 0.12);
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  max-width: 1180px;
  margin: 0 auto 4rem;
  padding: 0 1rem 2rem;
}

.tpid-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: repeating-linear-gradient(
      -12deg,
      #0b2430 0 10px,
      #0e2d3a 10px 20px
    );
  color: #e8f7f8;
  border: 1px solid #1a4a55;
  border-radius: 4px;
  padding: 0.7rem 1rem;
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.tpid-banner strong {
  font-weight: 600;
}
.tpid-lamp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.tpid-lamp i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7dffb3;
  box-shadow: 0 0 8px #7dffb3;
  display: inline-block;
}

.tpid-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.15rem;
}
.tpid-kicker {
  font-family: ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3d6b73;
  margin: 0 0 0.25rem;
}
.tpid-head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.tpid-head p {
  margin: 0.4rem 0 0;
  max-width: 42rem;
  color: #35545a;
  line-height: 1.45;
}
.tpid-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tpid-btn,
.tpid-root button,
.tpid-root .tpid-btn {
  font-family: inherit;
  border: 1px solid #1c3d46;
  background: #102f38;
  color: #f4fffe;
  border-radius: 3px;
  padding: 0.48rem 0.8rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
}
.tpid-btn.ghost,
.tpid-root button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: #9bb8bd;
}
.tpid-btn.good {
  background: #1d6a52;
  border-color: #155744;
}
.tpid-btn.warn {
  background: #8a3d16;
  border-color: #6e2f10;
}
.tpid-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.tpid-btn:focus-visible,
.tpid-root button:focus-visible,
.tpid-root select:focus-visible,
.tpid-root input:focus-visible,
.tpid-root textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.tpid-desk {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 0.85rem;
  background: var(--ticket);
  border: 1px solid #c5d6d4;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(7, 24, 36, 0.08);
}
.tpid-col {
  background: #f7fbfa;
  min-height: 520px;
}
.tpid-col + .tpid-col {
  border-left: 1px solid var(--line);
  background: #fff;
}
.tpid-col-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: #10212b;
  color: #e7f6f6;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;
}

.tpid-order {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.2rem;
}
.tpid-order.active {
  background: #e4f4f3;
  box-shadow: inset 3px 0 0 var(--cyan);
}
.tpid-order b {
  font-size: 0.98rem;
}
.tpid-meta {
  color: #4b676c;
  font-size: 0.82rem;
}
.tpid-pill {
  display: inline-block;
  font-family: ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #d9eceb;
  color: #16343a;
}
.tpid-pill.processing { background: #d8ecff; color: #123a5c; }
.tpid-pill.completed { background: #d6f3e4; color: #145338; }
.tpid-pill.refunded { background: #f8d7d5; color: #6d1518; }
.tpid-pill.ready_for_pickup { background: #fff0c7; color: #5c4308; }

.tpid-panel {
  padding: 0.9rem 1rem 1.2rem;
}
.tpid-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.tpid-flags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.tpid-flag {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border: 1px dashed #8aa7ab;
  border-radius: 3px;
  color: #35555b;
}
.tpid-flag.bad { border-color: #c98989; color: #8a2428; }
.tpid-flag.good { border-color: #7dba9c; color: #1b5c40; }

.tpid-thread {
  background: #f2f7f6;
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 240px;
  max-height: 340px;
  overflow: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.tpid-msg {
  max-width: 86%;
  padding: 0.55rem 0.7rem;
  border-radius: 8px 8px 8px 2px;
  background: #fff;
  border: 1px solid #d5e3e2;
  font-size: 0.92rem;
  line-height: 1.4;
}
.tpid-msg.out {
  align-self: flex-end;
  background: #12343c;
  color: #eefbfb;
  border-color: #12343c;
  border-radius: 8px 8px 2px 8px;
}
.tpid-msg small {
  display: block;
  margin-top: 0.3rem;
  opacity: 0.72;
  font-family: ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;
  font-size: 0.68rem;
}

.tpid-compose textarea,
.tpid-root textarea,
.tpid-root input[type="text"],
.tpid-root input[type="number"],
.tpid-root select {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  border: 1px solid #b7ccc9;
  border-radius: 3px;
  padding: 0.5rem 0.6rem;
  background: #fff;
  color: var(--ink);
}
.tpid-compose textarea { min-height: 88px; resize: vertical; }
.tpid-templates { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.55rem 0; }
.tpid-templates button {
  background: #fff;
  color: var(--ink);
  border-color: #b7ccc9;
  font-size: 0.78rem;
}
.tpid-sendrow { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tpid-result {
  margin-top: 0.7rem;
  padding: 0.55rem 0.7rem;
  background: #fff6d8;
  border: 1px solid #e3c56a;
  border-radius: 3px;
  font-size: 0.88rem;
}
.tpid-result.ok { background: #e7f6ee; border-color: #9dceb3; }
.tpid-note {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: #4b676c;
}

.tpid-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 0.9rem;
}
.tpid-card {
  background: #fff;
  border: 1px solid #c5d6d4;
  border-radius: 6px;
  padding: 0.9rem;
}
.tpid-card h2 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}
.tpid-field { margin: 0 0 0.65rem; }
.tpid-field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3d6b73;
  margin-bottom: 0.25rem;
}
.tpid-stage {
  background: #0b1c24;
  border-radius: 6px;
  padding: 0.8rem;
}
.tpid-stage canvas {
  width: 100%;
  height: auto;
  background: #f4f7f6;
  border-radius: 4px;
  display: block;
  touch-action: none;
}
.tpid-legend {
  display: flex;
  gap: 1rem;
  color: #cfe7ea;
  font-size: 0.8rem;
  margin: 0.5rem 0 0;
}
.tpid-legend b.pa { color: #4da3ff; }
.tpid-legend b.sm { color: #39d98a; }

.tpid-toolbar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0; }
.tpid-layers { list-style: none; margin: 0; padding: 0; }
.tpid-layers li {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}

.tpid-preview {
  font-family: ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;
  font-size: 0.75rem;
  background: #071824;
  color: #d5f4ea;
  border-radius: 4px;
  padding: 0.8rem;
  overflow: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-word;
}
.tpid-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.25rem 0.7rem;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}
.tpid-kv dt { color: #4b676c; }
.tpid-kv dd { margin: 0; }

.tpid-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
}
.tpid-hub a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #c5d6d4;
  border-radius: 6px;
  padding: 1rem 1.05rem;
  min-height: 150px;
}
.tpid-hub a:hover { border-color: #1f6f73; }
.tpid-hub h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.tpid-hub p { margin: 0; color: #4b676c; line-height: 1.4; }
.tpid-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-family: ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #12343c;
  color: #9be7dc;
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}

.tpid-peppol {
  background: #12343c;
  color: #e7f6f6;
  padding: 0.7rem 0.85rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin: 0.6rem 0 0.9rem;
}

@media (max-width: 820px) {
  .tpid-desk,
  .tpid-grid,
  .tpid-head {
    grid-template-columns: 1fr;
  }
  .tpid-col { min-height: 0; }
  .tpid-col + .tpid-col { border-left: 0; border-top: 1px solid var(--line); }
  .tpid-kv { grid-template-columns: 1fr; }
}
