/* backend>static>awf>token>css>awf_token.css */
:root {
  --t-bg: #0b0b12;
  --t-text: #ffffff;

  --t-card: rgba(255,255,255,0.06);
  --t-surface: rgba(255,255,255,0.04);
  --t-input: rgba(0,0,0,0.25);

  --t-line: rgba(255,255,255,0.14);
  --t-line-strong: rgba(255,255,255,0.22);

  --t-text-soft: rgba(255,255,255,0.82);
  --t-link: #7dd3fc;
}

html[data-theme="light"] {
  --t-bg: #f7f7f5;
  --t-text: #09090A;

  --t-card: rgba(0,0,0,0.035);
  --t-surface: rgba(0,0,0,0.04);
  --t-input: #eeeeeb;

  --t-line: rgba(0,0,0,0.14);
  --t-line-strong: rgba(0,0,0,0.22);

  --t-text-soft: rgba(9,9,10,0.72);
  --t-link: #2563eb;
}

body.awf-token {
  margin: 0;
}
html,
body {
  width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Media should never exceed viewport width */
img,
video,
model-viewer,
iframe {
  max-width: 100%;
}

.t-page {
  background: var(--t-bg);
  color: var(--t-text);
  min-height: 100vh;
}

.t-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.t-back {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--t-text);
  text-decoration: none;
  font-weight: 400;
}
.t-back:hover {
  opacity: 0.7;
}

.t-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 980px) {
  .t-grid {
    grid-template-columns: 1fr;
  }
}

.t-left,
.t-right {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.t-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.t-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Image media: segue l'altezza reale dell'immagine */
#mediaImg {
  min-height: 0;
}

#mediaImg img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.t-ph {
  opacity: 0.85;
  font-weight: 900;
}

.t-tabs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.t-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.t-actions-row .t-tabs {
  margin-top: 0;
}

.t-actions-row .t-update-row {
  margin-top: 0;
  margin-left: auto;
}

.t-tab {
  padding: 7px 10px;
  border: 1px solid var(--t-line-strong);
  border-radius: 12px;
  background: var(--t-surface);
  color: var(--t-text-soft);
  font-weight: 500;
  cursor: pointer;
}

.t-tab.active {
  border-color: var(--t-line-strong);
  background: var(--t-card);
  color: var(--t-text);
}
.t-tab:hover {
  border-color: var(--t-line-strong);
  background: var(--t-card);
  color: var(--t-text);
}

.t-update-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 7px 10px;
  border: 1px solid var(--t-line-strong);
  border-radius: 12px;
  background: var(--t-surface);
  color: var(--t-text-soft);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.t-update-btn:hover {
  border-color: var(--t-line-strong);
  background: var(--t-card);
  color: var(--t-text);
}

.t-title {
  margin: 0;
  font-size: 22px;
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.t-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  opacity: 0.85;
}

.t-collection {
  font-weight: 900;
}

.t-owned {
  opacity: 0.85;
}

.badge {
  display: inline-flex;
  margin-right: 8px;
  padding: 6px 10px;
  border: 1px solid var(--t-line);
  border-radius: 999px;
  background: var(--t-card);
  color: var(--t-text);
  font-weight: 900;
}

.t-badges {
  margin: 10px 0;
}

.t-section {
  margin-top: 14px;
}

.t-sec-title {
  font-weight: 1000;
  opacity: 0.9;
}

.t-kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
  margin-top: 10px;
  opacity: 0.9;
}

@media (max-width: 520px) {
  .t-kv {
    grid-template-columns: 1fr;
  }
}

.t-kv a {
  color: #7dd3fc;
  text-decoration: none;
}

.t-traits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .t-traits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .t-traits {
    grid-template-columns: 1fr;
  }
}

.trait {
  padding: 10px 12px;
  border: 1px solid var(--t-line);
  border-radius: 14px;
  background: var(--t-card);
}
.trait-k {
  opacity: 0.7;
  font-weight: 900;
  font-size: 12px;
}

.trait-v {
  margin-top: 6px;
  font-weight: 1000;
}

.t-desc {
  margin-top: 8px;
  opacity: 0.85;
  line-height: 1.55;
}

.t-muted {
  opacity: 0.7;
}

.pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  border: 1px solid var(--t-line);
  border-radius: 999px;
  background: var(--t-card);
  color: var(--t-text);
  font-size: 12px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Owner Console (burn / transfer) */
.t-owner-console {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--t-line);
  border-radius: 16px;
  background: var(--t-card);
}

.oc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.oc-title {
  font-weight: 1000;
}

.oc-status {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  opacity: 0.95;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.oc-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  margin-top: 10px;
}

.oc-btn {
  padding: 10px 12px;
  border: 1px solid var(--t-line);
  border-radius: 12px;
  background: var(--t-card);
  color: var(--t-text);
  font-weight: 900;
  cursor: pointer;
}

.oc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.oc-btn.danger {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(251, 113, 133, 0.10);
}

.oc-in {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--t-line);
  border-radius: 12px;
  background: var(--t-input);
  color: var(--t-text);
}

.oc-hint {
  margin-top: 0px;
  opacity: 0.7;
  font-size: 12px;
  line-height: 1.45;
}

.oc-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.oc-actions-row .oc-btn {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.oc-status:empty {
  display: none;
}

.oc-status.address {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 42px;
  padding: 10px 14px;

  border: 1px solid var(--t-line);
  border-radius: 12px;

  background: var(--t-card);

  color: var(--t-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 16px;
  font-weight: 800;

  overflow-wrap: anywhere;
  text-align: center;
}

.t-poly {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 900;
}

.t-poly:hover {
  filter: brightness(1.08);
}

@media (max-width: 520px) {
  /* Prevent the upper row from stretching */
  .t-row {
    min-width: 0;
  }

  /* Allow the Polygonscan link to wrap if needed */
  .t-owned {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* Status should not be constrained by a fixed percentage */
  .oc-status {
    max-width: 100%;
  }

  /* Slightly more compact buttons on mobile */
  .oc-btn {
    padding: 9px 10px;
    font-size: 13px;
  }
 /* Owner Console: buttons stacked on mobile */
  .oc-actions-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

    .oc-actions-row .oc-btn {
    width: 100%;
    min-height: 40px;
  }

  /* Recipient + INVIA stacked on mobile */
  .oc-recipient-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .oc-recipient-row .oc-status {
    width: 100%;
    min-height: 40px;
  }

  .oc-send {
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }
}
/* Owner Console - QR scanner */

.oc-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);

  overflow: hidden;
}

.oc-qr-panel {
  width: min(520px, calc(100vw - 32px));
  padding: 16px;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;

  background: #18181f;
  color: #fff;

  text-align: center;
  overflow: hidden;
}

.oc-qr-title {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 900;
}

.oc-qr-video {
  width: 100%;
  height: 300px;

  border-radius: 14px;
  background: #000;

  overflow: hidden;
}

.oc-qr-video video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.oc-qr-hint {
  margin: 12px 0;
  font-size: 12px;
  opacity: 0.7;
}
.oc-recipient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}

.oc-recipient-row .oc-status {
  margin-bottom: 0;
}

.oc-send {
  min-width: 92px;
  padding-left: 18px;
  padding-right: 18px;
}
/* Owner Console - processing */

.oc-status.warn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.70);
  background: rgba(250, 204, 21, 0.08);

  box-shadow:
    0 0 12px rgba(250, 204, 21, 0.18),
    inset 0 0 12px rgba(250, 204, 21, 0.05);
}

.oc-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;

  border: 2px solid rgba(250, 204, 21, 0.30);
  border-top-color: #facc15;
  border-radius: 50%;

  animation: oc-spin 0.8s linear infinite;
}

@keyframes oc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   BURN CONFIRM MODAL
   ========================================================= */

.burn-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.burn-confirm-card {
  width: 100%;
  max-width: 430px;
  padding: 24px;
  border-radius: 18px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #0b0b0d;
  border: 1px solid rgba(248, 113, 113, 0.55);

  box-shadow: 0 0 24px rgba(239, 68, 68, 0.22);
}

.burn-confirm-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  margin-bottom: 18px;
  padding: 4px 10px;

  border-radius: 12px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.55);

  color: #f87171;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.burn-confirm-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #f87171;
}

.burn-confirm-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.burn-confirm-card p {
  margin: 0;
  color: #b8b8b8;
  font-size: 14px;
  line-height: 1.5;
}

.burn-confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.burn-confirm-actions button {
  flex: 1;
  min-height: 44px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

#burn-confirm-cancel {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

#burn-confirm-accept {
  color: #f87171;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}
