/* Wire MCP checkout popup (parent page). Calm, trustworthy modal shell. */
.wire-checkout-dialog{
  --wc-ink:#16203a;--wc-muted:#5b6478;--wc-line:#e3e6f0;--wc-bg:#f6f7fc;--wc-card:#fdfdff;
  --wc-accent:#5146e5;--wc-accent-2:#2f6bd1;
  padding:0;margin:auto;border:0;background:transparent;color:var(--wc-ink);
  width:min(1080px,calc(100vw - 48px));max-width:none;height:min(860px,calc(100vh - 48px));height:min(860px,calc(100dvh - 48px));max-height:none;
  overflow:visible;font-family:"DM Sans",-apple-system,"Segoe UI",system-ui,sans-serif;
}
.wire-checkout-dialog[hidden]{display:none}
.wire-checkout-dialog::backdrop{background:rgba(18,24,48,.52);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.wire-checkout-dialog[open]{animation:wcIn .22s ease-out}
.wire-checkout-panel{
  display:flex;flex-direction:column;width:100%;height:100%;min-height:0;box-sizing:border-box;
  background:var(--wc-card);border-radius:18px;overflow:hidden;
  box-shadow:0 30px 80px -20px rgba(28,30,90,.45),0 0 0 1px rgba(81,70,229,.08);
}
.wire-checkout-header{
  position:relative;display:grid;grid-template-columns:160px minmax(0,1fr) 160px;align-items:center;gap:16px;flex:0 0 auto;
  padding:18px 24px 16px;border-bottom:1px solid var(--wc-line);background:var(--wc-card);
}
.wire-checkout-header::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,var(--wc-accent),var(--wc-accent-2))}
.wire-checkout-brand{
  display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14px;letter-spacing:-.01em;color:var(--wc-accent);
  justify-self:start;min-width:0;white-space:nowrap;line-height:1;
}
.wire-checkout-logo{display:block;width:160px;height:30px;max-width:100%;object-fit:contain;object-position:left center}
#wire-checkout-title{margin:0;min-width:0;text-align:center;font-size:19px;line-height:1.3;font-weight:650;letter-spacing:-.015em;color:var(--wc-ink);text-transform:none}
.wire-checkout-dialog .wire-checkout-close{
  justify-self:end;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;margin:0;
  border:0;border-radius:0;background:transparent;color:var(--wc-muted);
  font-size:22px;line-height:1;cursor:pointer;box-shadow:none;transition:color .15s;
}
.wire-checkout-dialog .wire-checkout-close:hover{background:transparent;color:var(--wc-ink)}
.wire-checkout-dialog .wire-checkout-close:focus{background:transparent;color:var(--wc-muted);outline:none}
.wire-checkout-dialog .wire-checkout-close:active{background:transparent;color:var(--wc-ink);box-shadow:none}
.wire-checkout-dialog .wire-checkout-close:focus-visible{outline:3px solid var(--wc-accent-2);outline-offset:2px}
.wire-checkout-content{position:relative;flex:1 1 auto;min-height:0;overflow:hidden;background:var(--wc-bg)}
.wire-checkout-frame{display:block;width:100%;height:100%;border:0;background:var(--wc-bg)}
.wire-checkout-frame[hidden]{display:none}
.wire-checkout-loading{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;
  box-sizing:border-box;padding:20px;text-align:center;overflow-wrap:anywhere;color:var(--wc-muted);font-size:15px;background:var(--wc-bg);z-index:1;
}
.wire-checkout-loading[hidden]{display:none}
.wire-checkout-loading::before{
  content:"";width:180px;height:4px;border-radius:4px;
  background:linear-gradient(90deg,rgba(81,70,229,.12) 0%,var(--wc-accent) 50%,rgba(81,70,229,.12) 100%);
  background-size:200% 100%;animation:wcBar 1.3s linear infinite;
}
.wire-checkout-footer{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 22px;border-top:1px solid var(--wc-line);background:var(--wc-card);font-size:13px;color:var(--wc-muted);
}
.wire-checkout-footer[hidden]{display:none}
.wire-checkout-fallback{display:inline-flex;align-items:center;justify-content:center;min-height:44px;color:var(--wc-accent-2);text-decoration:underline;text-underline-offset:3px}
.wire-checkout-fallback:hover{color:var(--wc-accent)}
.wire-checkout-fallback:focus-visible{outline:2px solid var(--wc-accent-2);outline-offset:2px;border-radius:3px}
html.wire-checkout-open,html.wire-checkout-open body{overflow:hidden}
@keyframes wcIn{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
@keyframes wcBar{from{background-position:200% 0}to{background-position:0 0}}
@media (max-width:767px), (max-width:1024px) and (max-height:500px){
  .wire-checkout-dialog{width:100%;height:100vh;height:var(--wire-checkout-viewport-height,100dvh);max-width:100%;max-height:none;margin:0;inset:var(--wire-checkout-viewport-top,0px) 0 auto}
  .wire-checkout-panel{border-radius:0;box-shadow:none}
  .wire-checkout-header{padding:10px max(12px,env(safe-area-inset-left),env(safe-area-inset-right));grid-template-columns:88px minmax(0,1fr) 88px;gap:8px;padding-top:max(10px,env(safe-area-inset-top))}
  #wire-checkout-title{font-size:14px}
  .wire-checkout-brand{font-size:12px}
  .wire-checkout-logo{width:88px;height:auto}
  .wire-checkout-content{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  .wire-checkout-footer{flex-wrap:wrap;gap:0;padding:4px max(12px,env(safe-area-inset-left),env(safe-area-inset-right));padding-bottom:max(4px,env(safe-area-inset-bottom));text-align:center;line-height:1.35}
  .wire-checkout-footer > span{width:100%;font-size:11px}
  .wire-checkout-fallback{display:inline-flex;align-items:center;justify-content:center;min-height:44px}
}
@media (max-width:1024px) and (max-height:500px){
  .wire-checkout-header{padding-top:max(4px,env(safe-area-inset-top));padding-bottom:4px}
  .wire-checkout-footer > span{display:none}
}
@media (prefers-reduced-motion:reduce){
  .wire-checkout-dialog[open]{animation:none}
  .wire-checkout-loading::before{animation:none}
  .wire-checkout-close{transition:none}
}
