/* DealCash front-end styles. Brand colour comes from Settings via --dc-brand. */
.dc {
	--dc-brand: var(--dc-brand-root, #0f766e);
	--dc-brand-ink: #fff;
	--dc-cash: #047857;
	--dc-cash-bg: #ecfdf5;
	--dc-text: #111827;
	--dc-muted: #6b7280;
	--dc-line: #e5e7eb;
	--dc-soft: #f6f7f9;
	--dc-card: #fff;
	--dc-radius: 14px;
	--dc-shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 6px 18px rgba(17, 24, 39, .06);
	box-sizing: border-box;
	color: var(--dc-text);
	font-family: inherit;
	line-height: 1.45;
}
.dc *, .dc *::before, .dc *::after { box-sizing: border-box; }
.dc [hidden] { display: none !important; }
.dc img { max-width: 100%; display: block; }
.dc-h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; color: var(--dc-text); }
.dc-muted { color: var(--dc-muted); }
.dc-note { color: var(--dc-muted); font-size: .88rem; margin: 6px 0 14px; }
.dc-empty { padding: 14px 16px; border: 1px dashed #cbd5e1; border-radius: 10px; color: var(--dc-muted); background: var(--dc-soft); }

/* Buttons */
.dc .dc-btn, .dc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	background: var(--dc-brand); color: var(--dc-brand-ink); border: 0; border-radius: 10px;
	padding: 10px 16px; font-weight: 700; font-size: .95rem; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: filter .15s, transform .15s;
}
.dc .dc-btn:hover, .dc-btn:hover { filter: brightness(1.08); color: var(--dc-brand-ink); }
.dc .dc-btn:active { transform: translateY(1px); }
.dc .dc-btn:focus-visible, .dc-link:focus-visible, .dc-tab:focus-visible, .dc-dot:focus-visible, .dc-chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--dc-brand) 45%, transparent); outline-offset: 2px; }
.dc .dc-btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.dc .dc-btn-lg { padding: 13px 22px; font-size: 1rem; width: 100%; }
.dc-link { background: none; border: 0; padding: 0; color: var(--dc-brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.dc-link[disabled] { color: var(--dc-muted); cursor: default; text-decoration: none; }

/* Header chip */
.dc-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
	background: var(--dc-brand); color: #fff; border: 0; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.dc-chip-in { background: var(--dc-cash-bg); color: var(--dc-cash); border: 1px solid #a7f3d0; }
.dc-chip:hover { filter: brightness(1.05); }

/* Banner slider */
.dc-banner { position: relative; margin: 0 0 28px; }
.dc-banner-track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	border-radius: 18px; scrollbar-width: none;
}
.dc-banner-track::-webkit-scrollbar { display: none; }
.dc-slide {
	position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: 300px;
	display: flex; align-items: flex-end; overflow: hidden; text-decoration: none; color: #fff;
	background: linear-gradient(120deg, var(--dc-brand), #1e1b4b);
}
.dc-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dc-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 55%, rgba(0,0,0,0) 100%); }
.dc-noimg::after { background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.18), transparent 45%); }
.dc-slide-body { position: relative; z-index: 1; padding: 28px clamp(20px, 4vw, 44px); max-width: 620px; display: flex; flex-direction: column; gap: 8px; }
.dc-slide-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-slide-logo { height: 30px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.dc-slide-store { font-weight: 800; background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 8px; font-size: .85rem; }
.dc-slide-tag { background: #facc15; color: #111; font-weight: 800; font-size: .72rem; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.dc-slide-title { font-size: clamp(1.4rem, 3.4vw, 2.3rem); font-weight: 800; line-height: 1.12; color: #fff; }
.dc-slide-sub { font-size: clamp(.95rem, 1.6vw, 1.1rem); color: #d1fae5; font-weight: 600; }
.dc-slide-cta { align-self: flex-start; margin-top: 8px; background: #fff; color: #111; font-weight: 800; padding: 10px 18px; border-radius: 10px; font-size: .95rem; }
.dc-slide:hover .dc-slide-cta { background: #facc15; }
.dc-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.dc-dot { width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0; background: #cbd5e1; cursor: pointer; transition: width .2s, background .2s; }
.dc-dot[aria-current="true"] { width: 26px; background: var(--dc-brand); }

/* Tabs */
.dc-deals { margin: 0 0 32px; }
.dc-tabs { display: flex; gap: 8px; margin-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
.dc-tab {
	display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px;
	border: 1px solid var(--dc-line); background: #fff; color: var(--dc-text); font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
}
.dc-tab[aria-selected="true"] { background: var(--dc-text); color: #fff; border-color: var(--dc-text); }
.dc-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: dc-pulse 1.6s infinite; }
@keyframes dc-pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); } 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

/* Grid + cards */
.dc-grid { display: grid; grid-template-columns: repeat(var(--dc-cols, 4), minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1024px) { .dc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .dc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.dc-card { background: var(--dc-card); border: 1px solid var(--dc-line); border-radius: var(--dc-radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--dc-shadow); transition: transform .18s, box-shadow .18s; }
.dc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(17,24,39,.12); }
.dc-card-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--dc-soft); }
.dc-card-img img { width: 100%; height: 100%; object-fit: cover; }
.dc-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; font-weight: 800; color: color-mix(in srgb, var(--dc-brand) 70%, #fff); background: linear-gradient(135deg, color-mix(in srgb, var(--dc-brand) 12%, #fff), #fff); }
.dc-badge { position: absolute; left: 10px; top: 10px; background: #dc2626; color: #fff; font-size: .72rem; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
.dc-card-body { padding: 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.dc-store { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--dc-muted); font-weight: 600; }
.dc-store img { height: 18px; width: auto; border-radius: 4px; }
.dc .dc-card-title { font-size: .95rem; font-weight: 700; line-height: 1.3; margin: 0; color: var(--dc-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.dc-price { display: flex; align-items: baseline; gap: 6px; }
.dc-price b { font-size: 1.05rem; }
.dc-price s { color: var(--dc-muted); font-size: .85rem; }
.dc-cb { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; background: var(--dc-cash-bg); color: var(--dc-cash); font-weight: 700; font-size: .8rem; padding: 4px 9px; border-radius: 999px; }
.dc-card .dc-btn { margin-top: auto; width: 100%; }

/* Steps */
.dc-steps { margin: 8px 0 36px; text-align: center; }
.dc-steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: dcstep; }
@media (max-width: 760px) { .dc-steps-list { grid-template-columns: 1fr; } }
.dc-step { position: relative; background: #fff; border: 1px solid var(--dc-line); border-radius: var(--dc-radius); padding: 26px 20px 20px; counter-increment: dcstep; box-shadow: var(--dc-shadow); }
.dc-step::before { content: counter(dcstep); position: absolute; top: 12px; left: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--dc-text); color: #fff; font-weight: 800; font-size: .85rem; display: grid; place-items: center; }
.dc-step-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: color-mix(in srgb, var(--dc-brand) 12%, #fff); color: var(--dc-brand); margin-bottom: 10px; }
.dc .dc-step h3 { font-size: 1.05rem; margin: 0 0 6px; font-weight: 800; color: var(--dc-text); }
.dc-step p { margin: 0; color: var(--dc-muted); font-size: .92rem; }
.dc-steps-cta { margin: 20px auto 0; max-width: 320px; }

/* Wallet */
.dc-wallet { max-width: 760px; margin: 0 auto 40px; }
.dc-wallet-out { text-align: center; padding: 32px 16px; }
.dc-wallet-out .dc-btn { max-width: 280px; }
.dc-wallet-hero { background: linear-gradient(135deg, var(--dc-brand), #1e1b4b); color: #fff; border-radius: 18px; padding: 22px; }
.dc-wallet-hero .dc-muted { color: rgba(255,255,255,.8); }
.dc-big { display: block; font-size: 2.4rem; font-weight: 800; line-height: 1.1; margin-top: 4px; }
.dc-progress { height: 10px; background: rgba(255,255,255,.22); border-radius: 999px; overflow: hidden; margin: 16px 0 8px; }
.dc-progress span { display: block; height: 100%; background: #facc15; border-radius: 999px; }
.dc-wallet-hero p { margin: 0; font-size: .9rem; }
.dc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 6px; }
@media (max-width: 600px) { .dc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dc-stats div { background: #fff; border: 1px solid var(--dc-line); border-radius: 12px; padding: 12px; }
.dc-stats span { display: block; font-size: .8rem; }
.dc-stats b { font-size: 1.15rem; }
.dc-withdraw { background: var(--dc-soft); border: 1px solid var(--dc-line); border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 1fr 160px auto; gap: 10px; align-items: end; margin: 18px 0 24px; }
.dc .dc-withdraw h3 { grid-column: 1 / -1; margin: 0; font-size: 1.05rem; }
.dc-withdraw label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--dc-muted); }
.dc-withdraw .dc-msg { grid-column: 1 / -1; margin: 0; }
@media (max-width: 600px) { .dc-withdraw { grid-template-columns: 1fr; } }
.dc input[type="text"], .dc input[type="email"], .dc input[type="number"] {
	width: 100%; padding: 11px 12px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 1rem; background: #fff; color: var(--dc-text);
}
.dc input:focus { outline: none; border-color: var(--dc-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dc-brand) 22%, transparent); }
.dc .dc-wallet h3 { font-size: 1.05rem; font-weight: 800; margin: 22px 0 10px; }
.dc-table-wrap { overflow-x: auto; }
.dc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dc-table th { text-align: left; color: var(--dc-muted); font-weight: 600; font-size: .8rem; border-bottom: 1px solid var(--dc-line); padding: 8px; }
.dc-table td { border-bottom: 1px solid var(--dc-line); padding: 10px 8px; }
.dc-table td:last-child, .dc-table th:last-child { text-align: right; font-weight: 700; }
.dc-pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--dc-soft); }
.dc-pending, .dc-requested { background: #fef3c7; color: #92400e; }
.dc-confirmed, .dc-paid { background: #d1fae5; color: #065f46; }
.dc-rejected { background: #fee2e2; color: #991b1b; }
.dc-clicks { margin-top: 20px; }
.dc-clicks summary { cursor: pointer; font-weight: 700; }
.dc-disclosure { font-size: .8rem; color: var(--dc-muted); text-align: center; margin: 12px auto; max-width: 720px; }

/* Modals */
.dc-modal { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 16px; }
.dc-modal[hidden] { display: none; }
.dc-modal-back { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); backdrop-filter: blur(2px); animation: dc-fade .2s ease; }
.dc-modal-box { position: relative; width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 28px 24px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: dc-pop .22s ease; max-height: calc(100vh - 32px); overflow-y: auto; }
.dc .dc-modal-box h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; color: var(--dc-text); }
.dc-modal-box > p { margin: 0 0 16px; }
.dc-modal-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--dc-soft); font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--dc-text); }
.dc-gift { display: inline-block; background: #fef3c7; color: #92400e; font-weight: 800; font-size: 1.1rem; padding: 6px 14px; border-radius: 10px; margin-bottom: 10px; }
.dc-modal form { display: flex; flex-direction: column; gap: 10px; }
.dc-modal label { font-size: .82rem; font-weight: 700; color: var(--dc-muted); margin-bottom: -4px; }
.dc-code-input { letter-spacing: .5em; text-align: center; font-size: 1.4rem !important; font-weight: 800; }
.dc-auth-links { display: flex; justify-content: space-between; }
.dc-or { display: flex; align-items: center; gap: 10px; color: var(--dc-muted); font-size: .8rem; margin: 14px 0; }
.dc-or::before, .dc-or::after { content: ""; flex: 1; height: 1px; background: var(--dc-line); }
.dc-msg { min-height: 1.2em; font-size: .88rem; margin: 10px 0 0; font-weight: 600; }
.dc-msg.is-error { color: #b91c1c; }
.dc-msg.is-ok { color: var(--dc-cash); }
.dc-fine { font-size: .75rem; color: var(--dc-muted); margin: 8px 0 0; text-align: center; }
.dc-center { text-align: center; overflow: hidden; }
.dc-check { width: 68px; height: 68px; margin: 4px auto 12px; border-radius: 50%; background: var(--dc-cash); color: #fff; display: grid; place-items: center; animation: dc-pop .4s ease; }
.dc-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 16px; }
.dc-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: dc-fall 1.6s ease-out .1s forwards; }
.dc-confetti i:nth-child(1) { left: 10%; background: #f59e0b; }
.dc-confetti i:nth-child(2) { left: 22%; background: #10b981; animation-delay: .25s; }
.dc-confetti i:nth-child(3) { left: 35%; background: #6366f1; animation-delay: .05s; }
.dc-confetti i:nth-child(4) { left: 48%; background: #ef4444; animation-delay: .35s; }
.dc-confetti i:nth-child(5) { left: 60%; background: #f59e0b; animation-delay: .15s; }
.dc-confetti i:nth-child(6) { left: 72%; background: #10b981; animation-delay: .4s; }
.dc-confetti i:nth-child(7) { left: 84%; background: #6366f1; animation-delay: .2s; }
.dc-confetti i:nth-child(8) { left: 93%; background: #ef4444; animation-delay: .3s; }
@keyframes dc-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(260px) rotate(540deg); } }
@keyframes dc-fade { from { opacity: 0; } }
@keyframes dc-pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
body.dc-noscroll { overflow: hidden; }

@media (max-width: 760px) {
	.dc-slide { min-height: 220px; }
	.dc-slide::after { background: linear-gradient(0deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.25) 70%, rgba(0,0,0,.1) 100%); }
	.dc-card-body { padding: 10px; }
	.dc .dc-card-title { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
	.dc *, .dc *::before, .dc *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
