/* payment-result.css - Resultado del pago (éxito, pendiente, rechazado)
   Blanco y negro, líneas finas: mismo lenguaje que el carrito y el checkout. */

.pay-result {
    display: flex;
    justify-content: center;
    padding: calc(var(--header-height, 96px) + 40px) 16px 64px;
    min-height: 70vh;
    background: #fafafa;
}

.pay-card {
    width: 100%;
    max-width: 560px;
    padding: 40px 36px 32px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    border-radius: 50%;
}

.pay-icon svg {
    width: 30px;
    height: 30px;
}

.pay-result[data-result="success"] .pay-icon { background: #111; color: #fff; }
.pay-result[data-result="pending"] .pay-icon { background: #fff6e5; color: #9a6400; }
.pay-result[data-result="failure"] .pay-icon { background: #fdecec; color: #b42318; }

.pay-eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777;
}

.pay-card h1 {
    margin: 0 0 12px;
    font-size: clamp(1.45rem, 3.4vw, 1.8rem);
    line-height: 1.2;
    color: #111;
}

.pay-lead {
    max-width: 440px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.pay-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 46px;
    padding: 0 22px;
    border: 1px solid #111;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.pay-btn--primary { background: #111; color: #fff; }
.pay-btn--primary:hover { background: #333; }
.pay-btn--ghost { background: #fff; color: #111; }
.pay-btn--ghost:hover { background: #f3f3f3; }

.pay-btn:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}

/* ---------- Detalle de la orden ---------- */
.pay-order {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid #ececec;
    border-radius: 12px;
    text-align: left;
}

.pay-order[hidden] { display: none; }

.pay-order-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.pay-order-head strong {
    display: block;
    font-size: 15px;
    color: #111;
    word-break: break-all;
}

.pay-label {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
}

.pay-order-date {
    flex-shrink: 0;
    font-size: 13px;
    color: #777;
}

.pay-tracker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 22px 0 4px;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.pay-tracker li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    text-align: center;
}

.pay-tracker li::before {
    content: "";
    position: absolute;
    top: 6px;
    left: calc(-50% + 8px);
    right: calc(50% + 8px);
    height: 2px;
    background: #e5e5e5;
}

.pay-tracker li:first-child::before { display: none; }

.pay-tracker-dot {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    border: 2px solid #d4d4d4;
    border-radius: 50%;
    background: #fff;
}

.pay-tracker li.done { color: #111; font-weight: 600; }
.pay-tracker li.done::before { background: #111; }
.pay-tracker li.done .pay-tracker-dot { border-color: #111; background: #111; }
.pay-tracker li.next { color: #555; }
.pay-tracker li.next .pay-tracker-dot { border-color: #111; }

.pay-items {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #f0f0f0;
}

.pay-items li {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pay-item-thumb {
    width: 48px;
    height: 48px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #f7f7f7;
    overflow: hidden;
}

.pay-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.pay-item-name {
    font-size: 14px;
    line-height: 1.35;
    color: #111;
}

.pay-item-name small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #888;
}

.pay-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}

.pay-totals {
    margin: 14px 0 0;
}

.pay-totals div {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 14px;
    color: #555;
}

.pay-totals dt, .pay-totals dd { margin: 0; }
.pay-totals .is-discount { color: #15803d; }

.pay-totals .is-total {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #ececec;
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.pay-address {
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.pay-note {
    margin: 20px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f6f6f6;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    text-align: left;
}

.pay-note[hidden] { display: none; }

/* ---------- Ayuda ---------- */
.pay-help {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #f0f0f0;
    text-align: left;
}

.pay-help h2 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #111;
}

.pay-help ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.7;
    color: #666;
}

.pay-contact {
    margin: 14px 0 0;
    font-size: 13px;
    color: #666;
}

.pay-contact a {
    color: #111;
    font-weight: 600;
    text-underline-offset: 3px;
}

.pay-skeleton {
    height: 12px;
    margin: 10px auto 0;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f1f1 25%, #e8e8e8 50%, #f1f1f1 75%);
    background-size: 200% 100%;
    animation: pay-shimmer 1.2s infinite;
}

@keyframes pay-shimmer {
    to { background-position: -200% 0; }
}

.pay-result + .footer {
    padding: 24px 16px;
    border-top: 1px solid #eee;
    background: #fff;
    color: #888;
    font-size: 12px;
    text-align: center;
}

.pay-result + .footer p {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .pay-skeleton { animation: none; }
}

@media (max-width: 600px) {
    .pay-result { padding: calc(var(--header-height, 80px) + 20px) 12px 40px; background: #fff; }
    .pay-card { padding: 28px 18px 24px; border: 0; }
    .pay-order { padding: 16px 14px; }
    .pay-order-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .pay-actions { flex-direction: column; }
    .pay-btn { width: 100%; }
}
