.twowallet-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
}

.twowallet-rewards-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.twowallet-rewards-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ── 2Wallet checkout panel — design system ─────────────────── */

.tw-checkout-panel {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    position: relative;
    overflow: hidden;
}

/* Loading skeleton shimmer */
.tw-checkout-panel.tw-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.8) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: tw-shimmer 1.4s infinite;
    pointer-events: none;
}

@keyframes tw-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.tw-checkout-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tw-checkout-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.tw-checkout-brand-initials {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1EC55C;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tw-checkout-header-text {
    flex: 1;
    min-width: 0;
}

.tw-checkout-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.tw-checkout-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0 0;
}

.tw-checkout-balance-badge {
    display: inline-flex;
    align-items: center;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    flex-shrink: 0;
}

.tw-checkout-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 16px 0;
}

.tw-checkout-section-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
}

.tw-checkout-catalog {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tw-checkout-reward-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.tw-checkout-reward-item:last-child {
    border-bottom: none;
}

.tw-reward-info {
    flex: 1;
    min-width: 0;
}

.tw-reward-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0;
}

.tw-reward-cost {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0 0;
}

.tw-reward-btn {
    background: #1EC55C;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tw-reward-btn:hover {
    background: #17a84f;
}

.tw-reward-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Cart: single-row layout (default) */
.tw-checkout-active {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Checkout: compact two-row layout, with remove button */
.tw-checkout-active--compact {
    flex-direction: column;
    gap: 4px;
}

.tw-checkout-active-icon {
    color: #1EC55C;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Cart: info column (name + saving text stacked) */
.tw-checkout-active-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tw-checkout-active-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0;
}

/* Cart: points redeemed line */
.tw-checkout-active-saving {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Checkout row 1: icon + name inline */
.tw-checkout-active-desc {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Checkout row 2: deduction in red, indented to align with name */
.tw-checkout-active-brief {
    font-size: 12px;
    color: #ef4444;
    padding-left: 24px;
}

.tw-remove-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 12px;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tw-remove-btn:hover {
    border-color: #9ca3af;
    color: #374151;
}

.tw-checkout-empty {
    text-align: center;
    padding: 16px 0 8px;
}

.tw-checkout-empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.tw-checkout-empty p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.tw-checkout-guest {
    padding: 12px 0 4px;
    text-align: center;
}

.tw-checkout-guest p {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 8px;
}

.tw-checkout-guest a {
    color: #1EC55C;
    font-weight: 600;
    text-decoration: none;
}

.tw-checkout-guest a:hover {
    text-decoration: underline;
}

.tw-checkout-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
}

/* ── My Account panel ───────────────────────────────────── */

.tw-account-panel {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

.tw-account-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tw-account-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.tw-account-brand-initials {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1EC55C;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tw-account-info {
    flex: 1;
    min-width: 0;
}

.tw-account-program-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.tw-account-program-type {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0 0;
}

.tw-account-balance-value {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ── 2Wallet pass download QR prompt ──────────────────────────── */

.tw-pass-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0 4px;
    text-align: center;
}

.tw-pass-download-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.tw-pass-download-desc {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    max-width: 240px;
}

.tw-pass-download-qr-link {
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

.tw-pass-download-qr-link:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(30, 197, 92, 0.25);
}

.tw-pass-download-qr {
    display: block;
    width: 160px;
    height: 160px;
    border: 2px solid #e5e7eb;
}

.tw-pass-download-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #1EC55C;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.tw-pass-download-link:hover {
    border-bottom-color: #1EC55C;
    text-decoration: none;
    color: #17a84f;
}

/* ── Mobile: show button, hide QR ───────────────────────────── */

.tw-pass-download-btn {
    display: none;
    padding: 12px 28px;
    background: #1EC55C;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s ease;
}

.tw-pass-download-btn:hover {
    background: #17a84f;
    color: #fff;
    text-decoration: none;
}

.tw-pass-download-desc--mobile {
    display: none;
}

@media (max-width: 768px) {
    .tw-pass-download-qr-link {
        display: none;
    }

    .tw-pass-download-desc--desktop {
        display: none;
    }

    .tw-pass-download-desc--mobile {
        display: block;
    }

    .tw-pass-download-btn {
        display: inline-block;
    }

    .tw-pass-download-link {
        display: none;
    }
}

/* ── 2Wallet account activity tables ─────────────────────────── */

.tw-account-activity {
    padding-top: 4px;
}

.tw-activity-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px;
}

.tw-activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #374151;
}

.tw-activity-table th,
.tw-activity-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #f3f4f6;
}

.tw-activity-table th {
    font-weight: 600;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tw-activity-table tbody tr:last-child td {
    border-bottom: none;
}

.tw-activity-qty {
    font-weight: 700;
    text-align: right;
}

.tw-activity-positive { color: #1EC55C; }
.tw-activity-negative { color: #ef4444; }

/* --- No-redemption notice (checkout read-only mode) --- */
.tw-checkout-no-redemption {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    margin-top: 8px;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 13px;
}
.tw-checkout-no-redemption-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.tw-checkout-no-redemption-text {
    margin: 0;
}

/* ── Guest toggle views ──────────────────────────────────────── */

.tw-guest-view { text-align: center; padding: 8px 0; }
.tw-guest-qr { display: block; margin: 12px auto; }
.tw-guest-email { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; margin: 8px 0; }
.tw-guest-link { display: inline-block; margin-top: 10px; font-size: 13px; color: #4b5563; text-decoration: none; cursor: pointer; }
/* Make the call-to-action part pop so the toggle is intuitive. */
.tw-guest-link-cta { color: #2563eb; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.tw-guest-link:hover .tw-guest-link-cta { color: #1d4ed8; }
.tw-guest-lookup-error { color: #b91c1c; font-size: 13px; margin-top: 6px; }
/* The QR is only useful on desktop (can't scan your own phone screen). */
@media (max-width: 600px) { .tw-guest-qr { display: none; } }

/* ── PIN verification box (guest redeem gate) ────────────────── */

.tw-pin-box { margin-top: 12px; text-align: center; }
.tw-pin-input { letter-spacing: 8px; text-align: center; font-size: 20px; padding: 8px; width: 160px; border: 1px solid #d1d5db; border-radius: 8px; }
.tw-pin-verify { display: block; margin: 10px auto 0; }
.tw-pin-error { color: #b91c1c; font-size: 13px; margin-top: 6px; }
/* Loading feedback while verifying the PIN. */
.tw-pin-loading { opacity: 0.6; }
.tw-pin-loading .tw-pin-verify { cursor: progress; }
.tw-pin-loading .tw-pin-verify::after {
	content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px;
	vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent;
	border-radius: 50%; animation: tw-pin-spin 0.6s linear infinite;
}
@keyframes tw-pin-spin { to { transform: rotate(360deg); } }

/* ── Guest widget redesign ─────────────────────────────── */
/* The redesigned balance view is left-aligned (teaser, rows, label). */
.tw-guest-view--balance { text-align: left; }

.tw-badge-free {
	background: transparent;
	border: 0;
	color: #15803d;
	font-weight: 600;
	padding: 0;
}

.tw-earn-box {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #ecfdf3;
	border-radius: 12px;
	padding: 12px 14px;
	margin: 14px 0 12px;
}
.tw-earn-icon { color: #15803d; flex-shrink: 0; line-height: 0; margin-top: 1px; }
.tw-earn-text { margin: 0; font-size: 14px; line-height: 1.4; color: #14532d; }
.tw-earn-text strong { display: block; color: #14532d; font-weight: 700; }

.tw-info-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 10px 0;
}
.tw-info-icon { color: #9ca3af; flex-shrink: 0; line-height: 0; margin-top: 1px; }
.tw-info-text { margin: 0; font-size: 13px; line-height: 1.4; color: #6b7280; }
.tw-info-text strong { color: #4b5563; font-weight: 600; }

.tw-field-label {
	display: block;
	margin: 16px 0 6px;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
}

/* ponytail: !important on the CTA — the widget lives in arbitrary themes whose
   button rules (.woocommerce a.button, button) outrank a single class; scope-
   hardening alone is unreliable. */
.tw-checkout-panel .tw-btn-primary,
a.tw-btn-primary,
button.tw-btn-primary {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	background: #1EC55C !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	border: 0 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	padding: 13px 16px !important;
	margin-top: 12px !important;
	cursor: pointer !important;
	transition: background 0.15s ease, opacity 0.15s ease;
}
.tw-checkout-panel a.tw-btn-primary:hover,
.tw-checkout-panel button.tw-btn-primary:hover {
	background: #17a94e !important;
	color: #fff !important;
}
.tw-btn-primary[aria-disabled="true"],
.tw-btn-primary:disabled {
	opacity: 0.55 !important;
	pointer-events: none;
}
.tw-btn-block { display: block; }
/* Green accent icon (person / "sin cuenta" row) to match the mockup. */
.tw-info-icon--accent { color: #15803d; }
.tw-info-icon--accent-2 { color: #D4AF37; }

.tw-guest-footer {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	text-align: center;
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #9ca3af;
}
.tw-guest-footer-icon { flex-shrink: 0; line-height: 0; margin-top: 1px; }
