/* DotPay BD – checkout */
.dotpay, .dotpay * { box-sizing: border-box; }
.dotpay [hidden], .dotpay .dotpay-preview[hidden], .dotpay .dotpay-drop[hidden], .dotpay .dotpay-drop-empty[hidden], .dotpay .dotpay-drop-progress[hidden] { display: none !important; }

.dotpay {
	--dp-ink: #0f172a;
	--dp-muted: #64748b;
	--dp-line: #e2e8f0;
	--dp-soft: #f8fafc;
	--dp-radius: 14px;
	--dp-brand: #E2136E;
	color: var(--dp-ink);
	font-size: 14px;
	line-height: 1.5;
	margin-top: 6px;
}
.dotpay-desc { margin: 0 0 12px; color: #475569; }

/* Gateway icons in the method list */
.dotpay-icons { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; vertical-align: middle; }
.dotpay-icons .dotpay-icon { height: 22px !important; width: auto; max-width: 64px; object-fit: contain; border-radius: 4px; margin: 0 !important; float: none !important; }
.dotpay-icons .dotpay-badge { font-size: 10px; padding: 2px 6px; }

/* Text badge fallback when no logo is set */
.dotpay-badge {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--dp-brand); color: #fff; font-weight: 700; letter-spacing: .2px;
	border-radius: 6px; padding: 4px 10px; font-size: 13px; line-height: 1.2;
}

/* ---------- Tabs ---------- */
.dotpay-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dotpay-tab {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	min-height: 84px; padding: 12px 8px; margin: 0;
	background: #fff !important; color: var(--dp-ink) !important;
	border: 1.5px solid var(--dp-line) !important; border-radius: var(--dp-radius) !important;
	cursor: pointer; font: inherit; text-transform: none; letter-spacing: 0; box-shadow: none;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.dotpay-tab:hover { border-color: color-mix(in srgb, var(--dp-brand) 45%, var(--dp-line)) !important; transform: translateY(-1px); }
.dotpay-tab:focus-visible { outline: 3px solid color-mix(in srgb, var(--dp-brand) 35%, transparent); outline-offset: 2px; }
.dotpay-tab.is-active {
	border-color: var(--dp-brand) !important;
	background: color-mix(in srgb, var(--dp-brand) 6%, #fff) !important;
	box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--dp-brand) 55%, transparent);
}
.dotpay-tab-logo { display: flex; align-items: center; justify-content: center; height: 34px; }
.dotpay-tab-logo img { max-height: 34px; max-width: 86px; width: auto; height: auto; object-fit: contain; margin: 0 !important; }
.dotpay-tab-label { font-size: 12.5px; font-weight: 600; color: var(--dp-muted); }
.dotpay-tab.is-active .dotpay-tab-label { color: var(--dp-brand); }
.dotpay-tab-check {
	position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
	border: 1.5px solid var(--dp-line); background: #fff;
}
.dotpay-tab.is-active .dotpay-tab-check { border-color: var(--dp-brand); background: var(--dp-brand); }
.dotpay-tab.is-active .dotpay-tab-check::after {
	content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Instruction card ---------- */
.dotpay-card {
	border-radius: var(--dp-radius); padding: 16px;
	background: linear-gradient(135deg, color-mix(in srgb, var(--dp-brand) 9%, #fff), #fff 70%);
	border: 1px solid color-mix(in srgb, var(--dp-brand) 22%, var(--dp-line));
	margin-bottom: 16px;
}
.dotpay-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dotpay-card-head img.dotpay-card-logo { max-height: 30px; max-width: 110px; width: auto; object-fit: contain; margin: 0 !important; }
.dotpay-pill {
	font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px;
	color: var(--dp-brand); background: color-mix(in srgb, var(--dp-brand) 12%, #fff);
}
.dotpay-row {
	display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
	background: #fff; border: 1px solid var(--dp-line); border-radius: 10px;
	padding: 10px 10px 10px 14px; margin-bottom: 8px;
}
.dotpay-row-label { color: var(--dp-muted); font-size: 12.5px; }
.dotpay-row-value { font-weight: 700; font-size: 16px; color: var(--dp-ink); }
.dotpay-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.dotpay-amount .woocommerce-Price-amount { color: var(--dp-brand); }
.dotpay-copy {
	margin: 0; padding: 6px 12px !important; min-height: 0; line-height: 1.2;
	font-size: 12px !important; font-weight: 600; text-transform: none; letter-spacing: 0;
	border-radius: 8px !important; border: 1px solid var(--dp-brand) !important;
	background: #fff !important; color: var(--dp-brand) !important; cursor: pointer; white-space: nowrap;
	transition: background .15s, color .15s;
}
.dotpay-copy:hover, .dotpay-copy.is-done { background: var(--dp-brand) !important; color: #fff !important; }
.dotpay-fee-note { margin: 2px 0 8px; font-size: 12px; color: var(--dp-muted); }
.dotpay-steps { margin: 10px 0 0 18px !important; padding: 0; color: #334155; font-size: 13px; }
.dotpay-steps li { margin: 3px 0; }

/* ---------- Fields ---------- */
.dotpay-fields { display: grid; gap: 4px; }
.dotpay-fields .form-row { margin: 0 0 10px !important; padding: 0 !important; width: 100% !important; float: none !important; }
.dotpay-fields label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.dotpay-fields input.input-text {
	width: 100%; height: 46px; padding: 10px 14px !important;
	border: 1.5px solid var(--dp-line) !important; border-radius: 10px !important;
	background: #fff !important; font-size: 15px; box-shadow: none !important;
}
.dotpay-fields input.input-text:focus {
	border-color: var(--dp-brand) !important; outline: none;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--dp-brand) 14%, transparent) !important;
}

/* Upload zone */
.dotpay .dotpay-drop {
	display: flex !important; align-items: center; justify-content: center; text-align: center;
	min-height: 120px; padding: 18px; margin: 0;
	border: 2px dashed color-mix(in srgb, var(--dp-brand) 35%, var(--dp-line)); border-radius: var(--dp-radius);
	background: var(--dp-soft); cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s;
}
.dotpay .dotpay-drop:hover, .dotpay .dotpay-drop.is-drag {
	border-color: var(--dp-brand); background: color-mix(in srgb, var(--dp-brand) 5%, #fff);
}
.dotpay-drop-empty, .dotpay-drop-progress { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dotpay-drop-empty strong { font-size: 14px; color: var(--dp-ink); }
.dotpay-drop-empty small, .dotpay-drop-progress small { color: var(--dp-muted); font-size: 12px; }
.dotpay-drop-icon {
	width: 40px; height: 40px; border-radius: 50%; margin-bottom: 4px;
	background: color-mix(in srgb, var(--dp-brand) 12%, #fff); position: relative;
}
.dotpay-drop-icon::before {
	content: ""; position: absolute; left: 50%; top: 11px; width: 2px; height: 16px; margin-left: -1px; background: var(--dp-brand);
}
.dotpay-drop-icon::after {
	content: ""; position: absolute; left: 50%; top: 11px; width: 9px; height: 9px; margin-left: -5px;
	border: solid var(--dp-brand); border-width: 2px 0 0 2px; transform: rotate(45deg);
}
.dotpay-bar { display: block; width: 180px; height: 6px; border-radius: 99px; background: var(--dp-line); overflow: hidden; }
.dotpay-bar i { display: block; height: 100%; width: 0; background: var(--dp-brand); transition: width .2s; }

.dotpay-preview {
	display: flex; align-items: center; gap: 14px; padding: 10px;
	border: 1.5px solid #bbf7d0; background: #f0fdf4; border-radius: var(--dp-radius);
}
.dotpay-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--dp-line); margin: 0 !important; }
.dotpay-preview-meta { display: flex; flex-direction: column; gap: 4px; }
.dotpay-preview-meta strong { color: #15803d; font-size: 13.5px; }
.dotpay-remove {
	align-self: flex-start; padding: 0 !important; background: none !important; border: 0 !important;
	color: var(--dp-muted) !important; text-decoration: underline; font-size: 12.5px !important; cursor: pointer; text-transform: none;
}
.dotpay-error { margin: 8px 0 0 !important; color: #b91c1c; font-size: 13px; font-weight: 500; }

/* Thank-you */
.dotpay-thanks { padding: 14px 16px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; margin-bottom: 18px; }
.dotpay-summary { margin-bottom: 24px; }

@media (max-width: 480px) {
	.dotpay-tabs { gap: 8px; }
	.dotpay-tab { min-height: 74px; padding: 10px 4px; }
	.dotpay-row { grid-template-columns: 1fr auto; }
	.dotpay-row-label { grid-column: 1 / -1; }
	.dotpay-row-value { font-size: 15px; }
}

/* WhatsApp confirm button (thank-you page) */
.dotpay-thanks { text-align: center; }
.dotpay-thanks p { margin: 0 0 12px; font-size: 15px; color: #14532d; }
.dotpay-wa-btn, .dotpay-wa-btn:visited {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 14px 26px; border-radius: 12px; background: #25D366; color: #fff !important;
	font-weight: 700; font-size: 16px; text-decoration: none !important; line-height: 1.2;
	box-shadow: 0 8px 22px -10px rgba(37, 211, 102, .8);
	transition: transform .15s, background .15s;
	animation: dotpay-pulse 2s ease-in-out infinite;
}
.dotpay-wa-btn:hover { background: #1ebe5a; transform: translateY(-1px); }
.dotpay-wa-btn svg { flex: none; }
@keyframes dotpay-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); }
	50% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) { .dotpay-wa-btn { animation: none; } }
@media (max-width: 480px) { .dotpay-wa-btn { width: 100%; } }

/* ---------- Thank-you confirm hero ---------- */
.dotpay-hero, .dotpay-hero * { box-sizing: border-box; }
.dotpay-hero {
	--dp-green: #16a34a; --dp-wa: #25D366; --dp-amber: #b45309;
	max-width: 640px; margin: 24px auto 32px; padding: 0;
	background: #fff; border-radius: 20px; overflow: hidden;
	border: 1px solid #e2e8f0; box-shadow: 0 24px 48px -24px rgba(15, 23, 42, .25);
	font-size: 15px; line-height: 1.6; color: #0f172a; text-align: center;
}
.dotpay-hero-top {
	padding: 32px 24px 24px;
	background: radial-gradient(120% 100% at 50% 0%, #dcfce7 0%, #f0fdf4 45%, #fff 100%);
}
.dotpay-hero-check {
	width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; position: relative;
	background: var(--dp-green); box-shadow: 0 0 0 10px rgba(22, 163, 74, .12);
	animation: dotpay-pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.dotpay-hero-check::after {
	content: ""; position: absolute; left: 26px; top: 16px; width: 18px; height: 32px;
	border: solid #fff; border-width: 0 5px 5px 0; transform: rotate(45deg);
}
@keyframes dotpay-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dotpay-hero-badge {
	display: inline-block; padding: 4px 12px; border-radius: 99px; margin-bottom: 8px;
	background: #fef3c7; color: var(--dp-amber); font-size: 13px; font-weight: 700;
}
.dotpay-hero .dotpay-hero-title { margin: 0 0 4px !important; font-size: 24px !important; line-height: 1.35 !important; font-weight: 800 !important; color: #0f172a !important; }
.dotpay-hero-meta { margin: 0 !important; color: #475569; font-size: 15px; }
.dotpay-hero-meta .woocommerce-Price-amount { font-weight: 700; color: #0f172a; }

/* Progress */
.dotpay-progress {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; list-style: none !important;
	margin: 0 !important; padding: 16px 20px !important; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; background: #fff;
}
.dotpay-progress li {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
	margin: 0 !important; font-size: 12.5px; font-weight: 600; color: #94a3b8; line-height: 1.3;
}
.dotpay-progress li span {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	background: #f1f5f9; color: #94a3b8; font-size: 14px; font-weight: 800; position: relative; z-index: 1;
}
.dotpay-progress li:not(:last-child)::after {
	content: ""; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px);
	height: 2px; background: #e2e8f0;
}
.dotpay-progress li.is-done { color: var(--dp-green); }
.dotpay-progress li.is-done span { background: var(--dp-green); color: #fff; }
.dotpay-progress li.is-done::after { background: var(--dp-green); }
.dotpay-progress li.is-current { color: #0f172a; }
.dotpay-progress li.is-current span { background: var(--dp-wa); color: #fff; box-shadow: 0 0 0 5px rgba(37, 211, 102, .2); }

/* Body */
.dotpay-hero-body { padding: 22px 24px 28px; }
.dotpay-alert {
	display: flex; flex-direction: column; gap: 4px; text-align: left;
	padding: 14px 16px; margin-bottom: 16px; border-radius: 12px;
	background: #fffbeb; border: 1.5px solid #fcd34d; color: #78350f; font-size: 14.5px;
}
.dotpay-alert strong { font-size: 15.5px; color: var(--dp-amber); }
.dotpay-hero-text p { margin: 0 0 18px !important; color: #334155; font-size: 15.5px; }
.dotpay-hero .dotpay-wa-big { width: 100%; padding: 18px 22px; font-size: 18px; border-radius: 14px; }
.dotpay-hero-hint { margin: 10px 0 0 !important; font-size: 13px; color: #64748b; }
.dotpay-hero-sent {
	margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px;
	background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534;
}
.dotpay-hero-sent[hidden] { display: none !important; }
.dotpay-hero.is-clicked .dotpay-wa-big { animation: none; background: #128c4a; }
.dotpay-hero.is-clicked .dotpay-progress li.is-current span { background: var(--dp-green); }

/* Mobile sticky bar */
.dotpay-sticky { display: none; }
@media (max-width: 767px) {
	.dotpay-hero { margin: 12px 10px 24px; border-radius: 16px; }
	.dotpay-hero-top { padding: 26px 16px 20px; }
	.dotpay-hero .dotpay-hero-title { font-size: 20px !important; }
	.dotpay-hero-body { padding: 18px 16px 22px; }
	.dotpay-progress { padding: 14px 8px !important; }
	.dotpay-progress li { font-size: 11.5px; }
	.dotpay-sticky {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 24px -12px rgba(15, 23, 42, .35);
	}
	.dotpay-sticky .dotpay-wa-btn { width: 100%; padding: 14px; font-size: 16px; }
	.dotpay-hero.is-clicked .dotpay-sticky { display: none; }
	body:has(.dotpay-sticky) { padding-bottom: 80px; }
}
