/* Orvyan — simulação: solicitar uma chave de API e copiar (/como-funciona/).
   Réplica do app: abas e rótulos de Solicitações, tabela de Chaves de API do
   Dashboard e o modal com confirmação por código. Estilos espelhados de
   orvyan-web/public/assets/app.css. Nada aqui é interativo de verdade. */

/* Palco um pouco mais alto: a cena de Solicitações cresce quando o formulário
   da chave abre e a confirmação aparece. */
#apikeydemo .sd-stage { height: 492px; }
@media (max-width: 700px) { #apikeydemo .sd-stage { height: 460px; } }

/* abas do app */
.ak-tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ak-tab {
  background: #eee;
  color: #333;
  border: 0;
  border-radius: 4px;
  padding: 8.8px 14px;
  font-size: 15px;
}
.ak-tab.is-active { background: #234a82; color: #fff; }

.ak-form { display: none; }
.ak-form.on { display: block; }

.ak-msg {
  padding: .6rem 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 15px;
  background: #e7f6ec;
  border-left: 3px solid #2b7a3d;
  opacity: 0;
  transition: opacity .3s ease;
}
.ak-msg.on { opacity: 1; }
.ak-msg.info { background: #eef4ff; border-left-color: #234a82; }

/* tabela de chaves */
.ak-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ak-table th, .ak-table td {
  text-align: left;
  padding: .45rem .5rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ak-table th { font-weight: 600; color: var(--muted); font-size: 13px; }
.ak-keyid {
  color: #234a82;
  text-decoration: underline;
  cursor: pointer;
}
.ak-status {
  font-size: .75rem;
  padding: .1rem .5rem;
  border-radius: 10px;
  background: #d4edda;
  color: #155724;
}

/* modal */
.ak-modal {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 26px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.ak-modal.on { opacity: 1; visibility: visible; }
.ak-panel {
  width: min(520px, 92%);
  background: #fff;
  border-radius: 6px;
  padding: 16px 18px;
  font-size: 15px;
}
.ak-panel p { margin: 0 0 .5rem; }
.ak-panel .muted { color: var(--muted); font-size: 13px; }
.ak-value {
  display: block;
  padding: .55rem;
  background: #f4f5f7;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  word-break: break-all;
}
.ak-value.copied { background: #d4edda; border-color: #b7dfc3; }
.ak-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 0; }
.ak-btn {
  background: #234a82;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 7px 13px;
  font-size: 14px;
  transition: transform .08s ease, filter .08s ease;
}
.ak-btn.press { transform: translateY(1px); filter: brightness(.9); }
.ak-btn[data-disabled="1"] { background: #c9cdd4; color: #7b8088; }
.ak-btn.link {
  background: none;
  color: #234a82;
  text-decoration: underline;
  padding: 7px 4px;
}

.ak-otp { display: none; margin-top: .7rem; }
.ak-otp.on { display: block; }
.ak-otp .sd-label { font-size: 14px; }
.ak-otp .sd-input { max-width: 180px; letter-spacing: .18em; font-family: ui-monospace, Consolas, monospace; }

.ak-toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translate(-50%, 8px);
  background: rgba(11, 31, 59, .93);
  color: #fff;
  border-radius: 4px;
  padding: .35rem .7rem;
  font-size: 13px;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 6;
}
.ak-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .ak-modal, .ak-toast, .ak-msg { transition: none; }
}
