/*
 * Tivra — Mockup: macOS terminal
 * ──────────────────────────────
 * Mockup da janela de terminal macOS com o Tivra a correr.
 * Auto-contido: o ficheiro tem tudo o que a janela precisa.
 *
 * Anatomia:
 *   .term-bleed     → área que sangra até ao bordo do viewport
 *   .mac-win        → a janela (cantos arredondados, sombra)
 *   .mac-bar        → barra de título com dots
 *   .mac-body       → corpo com o log de execução
 *   .mac-foot       → rodapé com input + meta
 *
 * O blink do cursor é uma @keyframes local.
 *
 * Tokens consumidos: --a1.
 */

.term-bleed {
  overflow: hidden;
  min-width: 0;
  min-height: 560px;
}

.mac-win {
  width: calc(100% / 0.85);
  height: 100%;
  min-height: 560px;
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Raleway", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #ececec;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 22px 50px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mac-bar {
  height: 48px;
  background: linear-gradient(180deg, #2c2c2c 0%, #232323 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}

.mac-dots {
  display: flex;
  gap: 8px;
  margin-right: 12px;
}

.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
}

.mac-dot.r { background: #ff5f57; }
.mac-dot.y { background: #febc2e; }
.mac-dot.g { background: #28c840; }

.mac-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 52px;
}

.mac-body {
  flex: 1;
  overflow: hidden;
  padding: 16px 18px 8px;
  position: relative;
  background: #0e0e0e;
}

.mac-usage {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

.mac-log {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.mac-user {
  background: #1c1c1c;
  border-radius: 8px;
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.mac-user .q { color: #f2f2f2; }
.mac-user .q::before { content: "› "; color: var(--a1); font-weight: 500; }

.mac-ts { color: rgba(255, 255, 255, 0.32); font-size: 11px; flex-shrink: 0; }

.mac-thought { color: rgba(255, 255, 255, 0.42); font-size: 12.5px; }
.mac-thought::before { content: "◆ "; color: rgba(255, 255, 255, 0.28); }

.mac-run { color: rgba(255, 255, 255, 0.78); }
.mac-run::before { content: "◆ "; color: #30d158; }

.mac-reply { color: rgba(255, 255, 255, 0.82); line-height: 1.55; max-width: 62ch; }

.mac-foot {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  background: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mac-input {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a1a;
  border-radius: 8px;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 8px;
}

.mac-input .caret { color: var(--a1); font-weight: 500; }
.mac-input .typed { color: #f4f4f4; }

.mac-blink {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: #f4f4f4;
  border-radius: 1px;
  vertical-align: -2px;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.mac-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.32);
  padding: 0 4px;
}

@media (max-width: 900px) {
  .term-bleed { min-height: 420px; height: 420px; }
  .mac-win    { min-height: 420px; height: 420px; }
}
