/* Checkout */
body.modal-open { overflow: hidden; }
.modal { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.modal .modal-card.cko {
  width: min(540px, 100%) !important;
  max-height: calc(100dvh - 24px) !important;
  padding: 26px 26px 22px !important;
  background: linear-gradient(180deg, #14161d 0%, #101218 100%) !important;
  border: 1px solid #2a2d38 !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(167, 139, 250, .06) !important;
  animation: ckoIn .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes ckoIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card.cko .close-modal { top: 14px; right: 14px; }
.modal-card.cko h2.cko-title {
  font-size: 24px !important; letter-spacing: -.5px !important; margin: 0 0 6px !important; line-height: 1.15 !important; color: #fff;
}

/* Pasos */
.cko-steps { display: flex; gap: 8px; list-style: none; margin: 0 28px 22px 0; padding: 0; }
.cko-steps li {
  flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #6f7380;
  padding-top: 10px; border-top: 2px solid #252833; transition: color .2s, border-color .2s;
}
.cko-steps li span {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: #1b1e27; border: 1px solid #2c303c; color: #8b8fa0;
}
.cko-steps li.now { color: #fff; border-color: #a78bfa; }
.cko-steps li.now span { background: #a78bfa; border-color: #a78bfa; color: #14101f; }
.cko-steps li.done { color: #c4b5fd; border-color: #6d55b8; }
.cko-steps li.done span { background: #2a2145; border-color: #6d55b8; color: #c4b5fd; }

.cko-lead { margin: 0 0 18px; color: #9da1ad; font-size: 14px; line-height: 1.55; }
.cko-lead b { color: #e5e7ee; font-weight: 600; word-break: break-all; }
.cko-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.cko-head-row .cko-lead { margin-bottom: 14px; }
.cko-head-total { text-align: right; padding: 8px 12px; border-radius: 12px; background: #191426; border: 1px solid #3a2f5c; }
.cko-head-total small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8e82b3; }
.cko-head-total strong { font-size: 20px; color: #ddd3ff; letter-spacing: -.3px; }

.cko-summary { background: #0f1117; border: 1px solid #23262f; border-radius: 14px; padding: 6px 14px; margin-bottom: 18px; }
.cko-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; color: #c9ccd6; border-bottom: 1px solid #1b1e26; }
.cko-line b { color: #fff; font-weight: 600; white-space: nowrap; }
.cko-total { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 0 8px; font-size: 13px; color: #9da1ad; }
.cko-total strong { font-size: 18px; color: #ddd3ff; }
.cko-details { margin-bottom: 18px; }
.cko-details summary { cursor: pointer; font-size: 13px; color: #a9acb8; list-style: none; padding: 2px 0 10px; }
.cko-details summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .15s; color: #8b7ad1; }
.cko-details[open] summary::before { transform: rotate(90deg); }
.cko-details summary::-webkit-details-marker { display: none; }
.cko-details .cko-summary { margin-bottom: 0; }

.cko-field { margin-bottom: 16px; }
.cko-label { display: block; font-size: 12px; font-weight: 600; color: #a9acb8; margin: 0 0 8px; }
.cko-label .req, .cko-label .opt { font-style: normal; font-size: 11px; margin-left: 6px; font-weight: 500; }
.cko-label .req { color: #f59e9e; }
.cko-label .opt { color: #6f7380; }
.cko-input {
  width: 100%; background: #0c0e13; border: 1px solid #2b2f3a; border-radius: 12px; padding: 13px 15px;
  color: #fff; font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.cko-input.mono { font-family: 'DM Mono', ui-monospace, monospace; font-size: 13px; }
.cko-input::placeholder { color: #5c606c; }
.cko-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, .18); }
.cko-input.invalid { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .14); }
.cko-error { color: #f87171; font-size: 12px; margin: 7px 0 0; min-height: 0; }
.cko-error:empty { display: none; }
.cko-hint { font-size: 12px; color: #70747f; margin: 8px 0 0; line-height: 1.45; }
.cko-alert { margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; background: #2a1517; border: 1px solid #5b2327; color: #fca5a5; font-size: 13px; line-height: 1.45; }
.cko-alert[hidden] { display: none; }
.link-btn { background: none; border: 0; padding: 0; color: #c4b5fd; font: inherit; text-decoration: underline; cursor: pointer; }

/* Botones */
.cko-btn {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px;
  padding: 13px 18px; border: 0; border-radius: 13px; font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .2s, background .2s, opacity .2s;
}
.cko-btn:hover:not(:disabled) { transform: translateY(-1px); }
.cko-btn:disabled { opacity: .45; cursor: not-allowed; }
.cko-btn:focus-visible, .chip-btn:focus-visible, .coin:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.cko-btn-primary { background: linear-gradient(135deg, #a78bfa, #7c4dff); color: #fff; box-shadow: 0 8px 24px rgba(124, 77, 255, .35); }
.cko-btn-primary:hover:not(:disabled) { box-shadow: 0 12px 30px rgba(124, 77, 255, .45); }
.cko-btn-discord { background: #5865f2; color: #fff; box-shadow: 0 8px 22px rgba(88, 101, 242, .35); margin-top: 16px; }
.cko-btn-discord:hover { background: #4955d8; }
.cko-btn-ghost { background: transparent; color: #b8bbc7; border: 1px solid #2c303b; margin-top: 12px; min-height: 44px; font-size: 14px; font-weight: 600; }
.cko-btn-ghost:hover { border-color: #5a4a8a; color: #fff; }
.cko-btn-primary + .cko-btn-discord { margin-top: 12px; }
.cko-secure { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 14px 0 0; font-size: 12px; color: #70747f; }
.cko-secure svg { color: #8b7ad1; flex: none; }

/* Monedas */
.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.coin {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 11px 6px 9px; background: #0f1117;
  border: 1px solid #262a35; border-radius: 13px; color: #b8bbc7; cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .12s;
}
.coin:hover { border-color: #4b4470; transform: translateY(-1px); }
.coin.on { border-color: #a78bfa; background: #181328; color: #fff; box-shadow: 0 0 0 1px rgba(167, 139, 250, .35), 0 8px 20px rgba(124, 77, 255, .15); }
.coin-badge {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-weight: 700; color: #fff;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 70%); box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 40%, transparent);
}
.coin-sym { font-size: 12px; font-weight: 700; letter-spacing: .02em; }

/* Tarjeta de pago */
.pay-card { background: #0f1117; border: 1px solid #262a35; border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.pay-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.pay-amount { min-width: 0; }
.pay-kicker { display: block; font: 11px 'DM Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: #8b7ad1; margin-bottom: 8px; }
.pay-figure { font-size: 28px; font-weight: 800; letter-spacing: -.6px; line-height: 1.1; color: #fff; word-break: break-all; }
.pay-figure .pay-sym { font-size: 18px; font-weight: 700; margin-left: 2px; }
.pay-eur { display: block; margin: 6px 0 12px; font-size: 13px; color: #8c909c; }
.pay-qr { flex: none; width: 132px; height: 132px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.pay-qr svg { display: block; width: 100%; height: 100%; }
.pay-net { display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 16px; background: #14161d; border: 1px solid #23262f; border-radius: 10px; font-size: 12px; color: #9da1ad; flex-wrap: wrap; }
.pay-net b { color: #fff; font-weight: 600; }
.pay-net .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.addr-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; margin-bottom: 16px; background: #0c0e13; border: 1px solid #2b2f3a; border-radius: 12px; }
.addr-row code { flex: 1; min-width: 0; font: 12.5px/1.4 'DM Mono', ui-monospace, monospace; color: #e5e7ee; word-break: break-all; user-select: all; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; border: 1px solid #343846; background: #171a22;
  color: #cfd2dc; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; flex: none; transition: border-color .15s, background .15s, color .15s;
}
.chip-btn:hover { border-color: #6d55b8; color: #fff; }
.chip-btn.solid { background: #a78bfa; border-color: #a78bfa; color: #15101f; }
.chip-btn.solid:hover { background: #b9a2ff; }
.chip-btn.copied { background: #1d3a2e; border-color: #2f7a57; color: #7ee2b3; }
.pay-timer { margin-top: 12px; font-size: 12px; color: #8c909c; text-align: center; font-variant-numeric: tabular-nums; }
.pay-skel { display: grid; gap: 12px; margin-bottom: 16px; padding: 18px; background: #0f1117; border: 1px solid #262a35; border-radius: 16px; }
.pay-skel span { height: 18px; border-radius: 8px; background: linear-gradient(90deg, #171a22 25%, #20242e 50%, #171a22 75%); background-size: 200% 100%; animation: skel 1.2s infinite; }
.pay-skel span:first-child { height: 74px; }
@keyframes skel { to { background-position: -200% 0; } }

/* Espera y resultado */
.cko-center { text-align: center; }
.cko-center .cko-lead { max-width: 400px; margin-left: auto; margin-right: auto; }
.ring { width: 76px; height: 76px; margin: 6px auto 20px; border-radius: 50%; border: 3px solid #241f3a; border-top-color: #a78bfa; animation: spin 1s linear infinite; position: relative; }
.ring i { position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(167, 139, 250, .35), transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
.cko-progress { height: 5px; border-radius: 99px; background: #1b1e27; overflow: hidden; margin: 6px auto 14px; max-width: 360px; }
.cko-progress div { height: 100%; width: 4%; border-radius: inherit; background: linear-gradient(90deg, #7c4dff, #c4b5fd); transition: width .6s ease; }

.seal { width: 84px; height: 84px; margin: 4px auto 18px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.seal::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid currentColor; opacity: .25; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.85); opacity: .5; } to { transform: scale(1.25); opacity: 0; } }
.seal.ok { color: #34d399; background: radial-gradient(circle at 30% 25%, #1f5a45, #0f2f25); border: 1px solid #2b7a5b; box-shadow: 0 0 40px rgba(52, 211, 153, .25); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.seal.wait { color: #fbbf24; background: radial-gradient(circle at 30% 25%, #4a3a14, #2a2009); border: 1px solid #7a5f1d; box-shadow: 0 0 40px rgba(251, 191, 36, .18); }
.seal.ok svg { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }

.order-id { display: grid; gap: 10px; justify-items: center; margin: 4px 0 20px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #1a1430, #131020); border: 1px solid #4a3b7d; box-shadow: 0 0 30px rgba(124, 77, 255, .12); }
.order-id small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #8e82b3; }
.order-id code { font: 700 26px 'DM Mono', ui-monospace, monospace; letter-spacing: .1em; color: #efe9ff; user-select: all; }

.claim { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 8px; text-align: left; }
.claim li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #0f1117; border: 1px solid #23262f; border-radius: 12px; }
.claim li span { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #231c3d; color: #c4b5fd; font-size: 12px; font-weight: 700; }
.claim b { display: block; font-size: 14px; color: #fff; }
.claim small { font-size: 12px; color: #858995; }

@media (max-width: 520px) {
  .modal .modal-card.cko { padding: 22px 16px 18px !important; border-radius: 18px !important; }
  .cko-steps { margin-right: 30px; }
  .cko-steps li { font-size: 11px; gap: 5px; }
  .coin-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .pay-top { flex-direction: column-reverse; align-items: stretch; }
  .pay-qr { align-self: center; }
  .pay-amount { text-align: center; }
  .pay-amount .chip-btn { margin: 0 auto; }
  .cko-head-row { flex-direction: column; }
  .cko-head-total { text-align: left; align-self: stretch; display: flex; justify-content: space-between; align-items: baseline; }
  .order-id code { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .modal .modal-card.cko, .seal, .seal::before, .seal.ok svg, .ring, .pay-skel span { animation: none !important; }
  .seal.ok svg { stroke-dashoffset: 0; }
}

.cko-terms { display: flex; gap: 11px; align-items: flex-start; margin: 0 0 6px; padding: 12px 14px; border-radius: 12px; background: #0f1117; border: 1px solid #23262f; cursor: pointer; }
.cko-terms input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; border: 1.5px solid #4a4e5c; background: #0c0e13; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.cko-terms input:checked { background: #a78bfa; border-color: #a78bfa; }
.cko-terms input:checked::after { content: ""; width: 5px; height: 10px; border: solid #15101f; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cko-terms span { font-size: 12.5px; line-height: 1.5; color: #9da1ad; }
.cko-terms a { color: #c4b5fd; }
#ckoTermsError { margin: 0 0 12px; }
#ckoTermsError:empty { display: none; }
.cko-terms + #ckoTermsError:empty + .cko-btn, .cko-terms ~ .cko-btn { margin-top: 12px; }
