/* ===== Dugduk E-commerce — Frontend (WhatsApp widget) ===== */
.dgd-wa { position: fixed; bottom: var(--dgd-offset, 24px); z-index: 99999; font-family: 'Noto Serif Bengali', -apple-system, 'Segoe UI', Roboto, serif; }
.dgd-wa--right { right: 22px; }
.dgd-wa--left { left: 22px; }

.dgd-wa-btn {
	display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
	background: linear-gradient(135deg, #25d366, #128c4a);
	box-shadow: 0 6px 18px rgba(18, 140, 74, .45);
	transition: transform .15s ease; position: relative;
}
.dgd-wa-btn:hover { transform: scale(1.07); }
.dgd-wa-btn::after {
	content: ""; position: absolute; inset: -6px; border-radius: 50%;
	border: 2px solid rgba(37, 211, 102, .5); animation: dgd-pulse 2s ease-out infinite;
}
@keyframes dgd-pulse {
	0% { transform: scale(.9); opacity: .9; }
	100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.dgd-wa-btn::after { animation: none; }
}

.dgd-wa-bubble {
	position: absolute; bottom: 72px; width: 290px; background: #fff; border-radius: 16px;
	box-shadow: 0 12px 34px rgba(16, 24, 40, .22); padding: 16px; animation: dgd-in .25s ease;
}
.dgd-wa--right .dgd-wa-bubble { right: 0; }
.dgd-wa--left .dgd-wa-bubble { left: 0; }
@keyframes dgd-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dgd-wa-agent { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dgd-wa-avatar { width: 40px; height: 40px; border-radius: 50%; background: #e7f8ee; display: grid; place-items: center; font-size: 20px; }
.dgd-wa-agent strong { display: block; color: #101828; font-size: 14px; }
.dgd-wa-agent small { color: #12b76a; font-size: 11px; }
.dgd-wa-bubble p { margin: 6px 0 12px; color: #344054; font-size: 14px; line-height: 1.5; }
.dgd-wa-start {
	display: block; text-align: center; background: #128c4a; color: #fff !important;
	border-radius: 10px; padding: 10px; text-decoration: none; font-weight: 700; font-size: 14px;
}
.dgd-wa-start:hover { background: #0a7d43; }
.dgd-wa-close {
	position: absolute; top: 8px; right: 10px; border: 0; background: transparent;
	font-size: 18px; color: #98a2b3; cursor: pointer; line-height: 1;
}

@media (max-width: 782px) { .dgd-hide-mobile { display: none !important; } }
@media (min-width: 783px) { .dgd-hide-desktop { display: none !important; } }

/* Dugduk Payments checkout UI */
.dgd-pay-methods { margin: 10px 0; }
.dgd-pay-option { display: block; padding: 9px 12px; border: 1px solid #e2e4e7; border-radius: 10px; margin: 6px 0; cursor: pointer; background: #fff; }
.dgd-pay-option:hover { border-color: #6d28d9; }
.dgd-pay-number { background: #f3e8ff; color: #6d28d9; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.dgd-pay-qr { text-align: center; margin: 8px 0; }

/* ===== Dugduk AI Chatbot ===== */
.dgd-bot { position: fixed; bottom: var(--dgd-offset, 24px); z-index: 99999; font-family: 'Noto Serif Bengali', -apple-system, sans-serif; }
.dgd-bot--right { right: 22px; } .dgd-bot--left { left: 22px; }
.dgd-bot-launcher {
	width: 62px; height: 62px; border-radius: 50%; border: 3px solid #6d28d9; background: #fff;
	cursor: pointer; padding: 4px; box-shadow: 0 6px 20px rgba(109,40,217,.4); transition: transform .15s;
}
.dgd-bot-launcher:hover { transform: scale(1.08); }
.dgd-bot-launcher img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.dgd-bot-panel {
	position: absolute; bottom: 76px; width: 330px; max-height: 480px; background: #fff; border-radius: 18px;
	box-shadow: 0 14px 40px rgba(16,24,40,.28); overflow: hidden; display: flex; flex-direction: column;
	animation: dgd-in .25s ease;
}
.dgd-bot--right .dgd-bot-panel { right: 0; } .dgd-bot--left .dgd-bot-panel { left: 0; }
@keyframes dgd-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dgd-bot-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(120deg, #4c1d95, #7c3aed); color: #fff; }
.dgd-bot-ava { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 2px; object-fit: contain; }
.dgd-bot-head-t { flex: 1; line-height: 1.2; }
.dgd-bot-head-t small { color: #86efac; font-size: 11px; }
.dgd-bot-wa { color: #25d366; background: #fff; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.dgd-bot-close { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 26px; height: 26px; border-radius: 50%; font-size: 15px; cursor: pointer; line-height: 1; }
.dgd-bot-gate { padding: 18px 16px; display: flex; flex-direction: column; gap: 9px; }
.dgd-bot-gate p { margin: 0 0 2px; font-size: 14px; color: #344054; }
.dgd-bot-gate input { border: 1px solid #d0d5dd; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-family: inherit; }
.dgd-bot-gate input:focus { border-color: #6d28d9; box-shadow: 0 0 0 3px rgba(109,40,217,.15); outline: none; }
.dgd-bot-start { background: #6d28d9; color: #fff; border: 0; border-radius: 10px; padding: 11px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.dgd-bot-start:hover { background: #5b21b6; }
.dgd-bot-msgs { flex: 1; overflow-y: auto; padding: 12px; background: #faf8ff; min-height: 200px; max-height: 300px; }
.dgd-bot-m { max-width: 82%; margin: 6px 0; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.dgd-bot-m--customer { background: #6d28d9; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.dgd-bot-m--bot, .dgd-bot-m--admin { background: #fff; border: 1px solid #ece9f5; border-bottom-left-radius: 4px; }
.dgd-bot-m--admin::before { content: "👤 "; }
.dgd-bot-inputrow { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; background: #fff; }
.dgd-bot-input { flex: 1; border: 1px solid #d0d5dd; border-radius: 999px; padding: 9px 14px; font-size: 14px; font-family: inherit; }
.dgd-bot-input:focus { border-color: #6d28d9; outline: none; }
.dgd-bot-send { background: #6d28d9; color: #fff; border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 16px; cursor: pointer; }
.dgd-bot-typing { color: #6b7280; font-size: 12px; padding: 0 12px 6px; }

/* Product page quick-order buttons */
.dgd-buy-now, .dgd-wa-order {
	display: inline-block; margin: 8px 8px 0 0; padding: 12px 22px; border-radius: 12px;
	font-weight: 700; text-decoration: none !important; font-size: 15px; line-height: 1.2; transition: .15s;
}
.dgd-buy-now { background: linear-gradient(120deg, #6d28d9, #7c3aed); color: #fff !important; box-shadow: 0 4px 14px rgba(109,40,217,.35); }
.dgd-buy-now:hover { transform: translateY(-1px); }
.dgd-wa-order { background: #e9fbf0; color: #128c4a !important; border: 2px solid #25d366; }
.dgd-wa-order:hover { background: #25d366; color: #fff !important; }
