/* AFFByte AI Coupons — front-end add-ons. Scoped with .affb- prefixes; theme styles untouched. */

/* Listen to coupon review */
.affb-tts{margin:0 0 16px;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.affb-tts button{cursor:pointer;border:0;border-radius:6px;padding:8px 14px;font-size:14px;background:#2271b1;color:#fff}
.affb-tts .affb-tts-controls button{background:#555;padding:6px 10px;margin-left:6px}
.affb-tts .affb-tts-controls[hidden]{display:none}

/* ===== Floating bottom CTA bar (clean) ===== */
.affb-ctabar{position:fixed;left:0;right:0;bottom:0;z-index:99990;display:flex;justify-content:center;
 pointer-events:none;transform:translateY(120%);transition:transform .35s ease}
.affb-ctabar.is-visible{transform:translateY(0)}
.affb-ctabar-inner{pointer-events:auto;position:relative;display:flex;align-items:center;gap:14px;flex-wrap:wrap;
 justify-content:center;max-width:960px;width:100%;padding:11px 44px 11px 16px;color:#1f2430;background:#faf7ff;
 border:1.5px dashed #c9b3ec;border-bottom:0;border-radius:14px 14px 0 0;box-shadow:0 -6px 24px rgba(60,30,110,.14);
 font-family:inherit}
.affb-ctabar-logo{width:36px;height:36px;object-fit:contain;background:#fff;border:1px solid #eee6fa;border-radius:8px;padding:4px}
.affb-ctabar-badge{color:#8529cd;font-weight:800;font-size:16px;white-space:nowrap}
.affb-ctabar-badge::before{content:"🎟 ";font-size:15px}
.affb-ctabar-text{display:flex;flex-direction:column;line-height:1.3;text-align:left}
.affb-ctabar-text strong{font-size:14px;font-weight:700;color:#1f2430}
.affb-ctabar-text small{font-size:11.5px;color:#16a34a}
.affb-ctabar-code{font-family:monospace;letter-spacing:1.5px;font-weight:700;color:#1f2430;background:#fff;
 border:1px dashed #c2b3e0;border-radius:8px;padding:7px 12px;display:inline-flex;align-items:center;gap:7px}
.affb-ctabar-code-label{font-family:inherit;font-size:9px;letter-spacing:.5px;background:#f3eefe;color:#6f1fb8;
 padding:2px 6px;border-radius:4px;font-weight:700}
.affb-ctabar-btn{background:#8529cd;color:#fff;text-decoration:none;padding:10px 22px;border-radius:9px;
 font-weight:700;font-size:14px;white-space:nowrap;transition:background .15s ease}
.affb-ctabar-btn:hover{background:#6f1fb8;color:#fff}
.affb-ctabar-btn .affb-arrow{margin-left:5px}
.affb-ctabar-close{position:absolute;top:7px;right:11px;background:transparent;border:0;color:#9b8fb8;font-size:19px;
 line-height:1;cursor:pointer}
.affb-ctabar-close:hover{color:#4a3d66}

/* ===== Coupon popup — real ticket + barcode (design #5) ===== */
.affb-popup-overlay{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;
 background:rgba(17,17,27,.55);opacity:0;transition:opacity .2s ease;padding:16px}
.affb-popup-overlay.is-open{opacity:1}
.affb-popup.affb-ticket{position:relative;display:block;background:#fff;max-width:400px;width:100%;border-radius:14px;
 overflow:hidden;text-align:center;box-shadow:0 24px 60px rgba(15,15,30,.3);border:1px solid #e8e2f4;
 transform:translateY(10px) scale(.98);transition:transform .25s ease;font-family:inherit;color:#1f2430}
.affb-popup-overlay.is-open .affb-popup.affb-ticket{transform:none}
.affb-popup-close{position:absolute;top:9px;right:11px;background:transparent;border:0;width:26px;height:26px;
 font-size:20px;line-height:1;color:#9b8fb8;cursor:pointer;z-index:3}
.affb-popup-close:hover{color:#4a3d66}
/* top stub — ticket paper, perforated bottom edge */
.affb-ticket-top{position:relative;background:#faf7ff;padding:24px 26px 20px;border-bottom:2px dashed #d9c9f2}
.affb-ticket-top::before,.affb-ticket-top::after{content:"";position:absolute;bottom:-11px;width:20px;height:20px;
 border-radius:50%;background:rgba(17,17,27,.55);z-index:2}
.affb-ticket-top::before{left:-11px}
.affb-ticket-top::after{right:-11px}
.affb-ticket-eyebrow{display:inline-flex;align-items:center;gap:7px;font-size:11px !important;font-weight:800;
 letter-spacing:1.2px;color:#8529cd;margin-bottom:8px;text-transform:uppercase}
.affb-ticket-logo{width:22px;height:22px;object-fit:contain;border:1px solid #eee;border-radius:5px;padding:2px;background:#fff}
.affb-ticket-disc{display:block;font-size:34px !important;font-weight:800;line-height:1.05 !important;color:#1f2430;
 letter-spacing:-.5px;margin:2px 0 6px}
.affb-ticket-title{margin:0 !important;font-size:13px !important;font-weight:500;color:#77708a;line-height:1.4 !important}
/* bottom — actions + barcode */
.affb-ticket-bottom{display:flex;align-items:stretch;gap:16px;padding:18px 22px 20px;text-align:left}
.affb-ticket-actions{flex:1;min-width:0}
.affb-popup-code-box{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px dashed #c2b3e0;
 border-radius:8px;padding:9px 13px;margin-bottom:11px;background:#faf7ff;cursor:pointer}
.affb-popup-code{font-family:monospace;font-size:14px;letter-spacing:2px;color:#1f2430;font-weight:700}
.affb-popup-copy{font-size:11px;color:#8529cd;font-weight:800;white-space:nowrap;text-transform:uppercase;letter-spacing:.4px}
.affb-popup-btn{display:flex;align-items:center;justify-content:center;gap:6px;background:#8529cd;color:#fff;
 text-decoration:none;padding:12px;border-radius:9px;font-size:14.5px;font-weight:700;transition:background .15s ease}
.affb-popup-btn:hover{background:#6f1fb8;color:#fff}
.affb-popup-btn .affb-arrow{transition:transform .2s ease}
.affb-popup-btn:hover .affb-arrow{transform:translateX(3px)}
.affb-popup-trust{margin:9px 0 0 !important;font-size:11.5px !important;line-height:1.3 !important;color:#16a34a;font-weight:600}
/* CSS barcode */
.affb-ticket-barcode{flex:0 0 46px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:6px}
.affb-ticket-barcode::before{content:"";flex:1;width:42px;min-height:58px;border-radius:2px;
 background:repeating-linear-gradient(90deg,#241b38 0 2px,#fff 2px 4px,#241b38 4px 5px,#fff 5px 8px)}
.affb-ticket-barcode span{font-size:8.5px;letter-spacing:1px;color:#9b8fb8;font-family:monospace;white-space:nowrap}
/* neutralise theme bleed */
.affb-popup.affb-ticket p{margin:0;padding:0;text-transform:none}

@media(max-width:600px){
 .affb-ctabar-inner{gap:9px;padding:11px 40px 11px 14px}
 .affb-popup.affb-ticket{max-width:330px}
 .affb-ticket-disc{font-size:28px !important}
 .affb-ticket-barcode{display:none}
}
