/* Wolf COA — button and viewer */

.wcoa-open {
  --c-blue: var(--blue, #1B4FD8); --c-navy: var(--navy, #0B2A5B);
  --c-line: var(--line, #D5E0EE); --c-surface: var(--surface, #F4F8FD);
  --c-slate: var(--slate, #5B6B82); --c-ok: var(--assay, #0B7355);
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--c-line); border-radius: 14px;
  padding: 13px 20px 13px 15px; margin: 4px 0 20px; text-align: left;
  font-family: inherit; color: var(--c-navy); max-width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.wcoa-open:hover { border-color: var(--c-blue); transform: translateY(-2px); box-shadow: 0 10px 26px -12px rgba(11, 42, 91, .3); }
.wcoa-open__icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--c-surface); }
.wcoa-open__icon svg { width: 19px; height: 19px; fill: none; stroke: var(--c-blue); stroke-width: 1.8; stroke-linejoin: round; }
.wcoa-open__text { display: flex; flex-direction: column; font-family: var(--display, inherit); font-weight: 700; font-size: .95rem; line-height: 1.25; }
.wcoa-open__text small { font-family: var(--mono, monospace); font-weight: 500; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-slate); margin-top: 3px; }

html.wcoa-locked, html.wcoa-locked body { overflow: hidden; }

.wcoa-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 20px; }
.wcoa-modal[hidden] { display: none; }
.wcoa-modal__backdrop { position: absolute; inset: 0; background: rgba(11, 42, 91, .6); backdrop-filter: blur(3px); }
.wcoa-modal__box {
  position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 900px;
  height: min(88vh, 1000px); display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5);
}
.wcoa-modal__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 18px 20px; border-bottom: 1px solid var(--line, #D5E0EE);
  background: linear-gradient(180deg, #F7FAFE, #fff); flex: 0 0 auto;
}
.wcoa-modal__head h3 { margin: 0; font-family: var(--display, inherit); font-size: 1.1rem; color: var(--navy, #0B2A5B); }
.wcoa-modal__lot { margin: 3px 0 0; font-family: var(--mono, monospace); font-size: .74rem; letter-spacing: .08em; color: var(--slate, #5B6B82); }
.wcoa-modal__x { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; background: #fff; border: 1px solid var(--line, #D5E0EE); border-radius: 10px; }
.wcoa-modal__x svg { width: 17px; height: 17px; fill: none; stroke: var(--navy, #0B2A5B); stroke-width: 1.9; }
.wcoa-modal__x:hover { border-color: var(--flag, #C63A28); }
.wcoa-modal__x:hover svg { stroke: var(--flag, #C63A28); }
.wcoa-modal__body { flex: 1 1 auto; min-height: 0; background: #F4F8FD; }
.wcoa-frame { width: 100%; height: 100%; border: 0; display: block; }
.wcoa-fallback { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; text-align: center; }
.wcoa-fallback svg { width: 54px; height: 54px; fill: none; stroke: var(--blue, #1B4FD8); stroke-width: 1.5; stroke-linejoin: round; }
.wcoa-fallback p { margin: 0; font-family: var(--display, inherit); font-weight: 700; color: var(--navy, #0B2A5B); word-break: break-word; }
.wcoa-fallback span { font-size: .88rem; color: var(--slate, #5B6B82); max-width: 34ch; }
.wcoa-modal__foot {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line, #D5E0EE); background: #fff;
}
.wcoa-modal__ruo { font-size: .78rem; color: var(--slate, #5B6B82); }
.wcoa-modal__actions { display: flex; gap: 8px; }
.wcoa-btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  font-family: var(--display, inherit); font-weight: 700; font-size: .85rem; padding: 11px 20px;
  border-radius: 999px; border: 2px solid transparent; color: #fff;
  background: linear-gradient(180deg, var(--blue-hot, #3B74F0), var(--blue, #1B4FD8));
}
.wcoa-btn:hover { color: #fff; opacity: .92; }
.wcoa-btn--ghost { background: #fff; color: var(--blue, #1B4FD8); border-color: var(--line, #D5E0EE); }
.wcoa-btn--ghost:hover { color: var(--navy, #0B2A5B); border-color: var(--blue, #1B4FD8); }

@media (max-width: 600px) {
  .wcoa-modal { padding: 10px; }
  .wcoa-modal__box { height: min(92vh, 900px); border-radius: 14px; }
  .wcoa-modal__foot { flex-direction: column; align-items: stretch; }
  .wcoa-modal__actions { flex-direction: column; }
  .wcoa-btn { width: 100%; }
  .wcoa-modal__ruo { text-align: center; }
}

/* ---------- rendered pages and loading ---------- */
.wcoa-pages { height: 100%; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; align-items: center; background: #E7EFF9; }
.wcoa-page { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 6px 18px -8px rgba(11, 42, 91, .4); }
.wcoa-loading { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--slate, #5B6B82); font-size: .9rem; }
.wcoa-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line, #D5E0EE); border-top-color: var(--blue, #1B4FD8); animation: wcoa-spin .8s linear infinite; }
@keyframes wcoa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wcoa-spin { animation-duration: 2.4s; } }
.wcoa-fallback .wcoa-btn { margin-top: 6px; }
