/* dawa4u core — dashboards, forms, badges. Uses the dawa4u theme colours (works in light and dark). */
.d4u-dash, .d4u-auth, .d4u-rxpage, .d4u-contact { --d4u-card: var(--card, #fff); --d4u-line: var(--line, #e5e7eb); --d4u-ink: var(--ink, #111827); --d4u-mute: var(--mute, #4b5563); --d4u-em: var(--em, #15370d); --d4u-emt: var(--em-text, #1f5216); --d4u-gold: var(--gold, #e5cd82); max-width: 860px; }
.d4u-card { background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 18px; padding: 18px 20px; margin: 0 0 14px; }
.d4u-card--soft { background: transparent; }
.d4u-card h2, .d4u-card h3 { margin: 0 0 6px; font-family: var(--sans, inherit); font-size: 20px; }
.d4u-small { font-size: 14px; color: var(--mute, #4b5563); margin: 4px 0; }
.d4u-h { font-family: var(--sans, inherit) !important; font-size: 18px !important; margin: 26px 0 10px !important; }
.d4u-empty { color: var(--mute, #4b5563); background: var(--card2, #fafafa); border: 1px dashed var(--line, #e5e7eb); border-radius: 14px; padding: 14px 16px; }
.d4u-boss { font-size: 14px; padding: 10px 14px; border-radius: 12px; background: var(--card2, #fff8e1); border: 1px solid var(--line, #ede3c3); }

/* forms */
.d4u-form { display: block; }
.d4u-field { display: block; margin: 0 0 12px; }
.d4u-field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; color: var(--ink, #111); }
.d4u-field input, .d4u-field select, .d4u-field textarea, .d4u-fill select, .d4u-fill input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--outline, #b9c7b3);
  background: var(--bg, #fff); color: var(--ink, #111); font: 16px/1.4 var(--sans, inherit); box-sizing: border-box;
}
.d4u-field textarea { min-height: 70px; }
.d4u-field input:focus, .d4u-field select:focus, .d4u-field textarea:focus { outline: 2px solid var(--em-text, #1f5216); outline-offset: 1px; }
.d4u-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.d4u-grid3 { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 0 12px; }
@media (max-width: 640px) { .d4u-grid2, .d4u-grid3 { grid-template-columns: 1fr; } }
.d4u-hp { position: absolute !important; left: -9999px !important; }

.d4u-btn, .d4u-dash button.d4u-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1.5px solid var(--em, #15370d); background: var(--em, #15370d); color: #fff !important; font: 700 15px var(--sans, inherit); cursor: pointer; text-decoration: none; }
.d4u-btn:hover { background: var(--em-hi, #1f4d14); }
.d4u-btn--ghost { background: transparent; color: var(--ink, #111) !important; border-color: var(--outline, #b9c7b3); }
.d4u-btn--ghost:hover { background: var(--card2, #f5f5f5); }
.d4u-btn--danger { background: #b42318; border-color: #b42318; }
.d4u-btn--danger:hover { background: #912018; }
.button.d4u-btn-gold, a.d4u-btn-gold { background: var(--gold, #e5cd82) !important; color: var(--on-gold, #1e1a08) !important; border-color: var(--gold, #e5cd82) !important; font-weight: 700; }
.d4u-inline { display: inline; margin: 0; }
.d4u-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: 8px; }
.d4u-reject summary { cursor: pointer; min-height: 46px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line, #e5e7eb); font-weight: 600; list-style: none; }
.d4u-reject summary::-webkit-details-marker { display: none; }
.d4u-reject[open] { flex-basis: 100%; }
.d4u-reject[open] summary { margin-bottom: 10px; }

/* tabs + header */
.d4u-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.d4u-tabs a { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line, #e5e7eb); text-decoration: none; color: var(--ink, #111); font-weight: 600; font-size: 15px; background: var(--card, #fff); }
.d4u-tabs a.on { background: var(--em, #15370d); border-color: var(--em, #15370d); color: #fff; }
.d4u-count { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--gold, #e5cd82); color: var(--on-gold, #1e1a08); font-size: 12px; text-align: center; }
.d4u-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.d4u-switch { min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--outline, #b9c7b3); background: transparent; color: var(--ink, #111); font: 700 15px var(--sans, inherit); cursor: pointer; }
.d4u-switch::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; margin-right: 8px; }
.d4u-switch.is-on { border-color: #16a34a; color: var(--em-text, #166534); }
.d4u-switch.is-on::before { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .2); }

/* flash */
.entry-content > .d4u-flash { max-width: 860px; }
.d4u-flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 14px; font-size: 15px; border: 1px solid; }
.d4u-flash--ok { background: rgba(22, 163, 74, .1); border-color: rgba(22, 163, 74, .4); color: var(--ink, #111); }
.d4u-flash--error { background: rgba(220, 38, 38, .1); border-color: rgba(220, 38, 38, .45); color: var(--ink, #111); }
.d4u-flash--warn { background: rgba(217, 119, 6, .12); border-color: rgba(217, 119, 6, .45); color: var(--ink, #111); }

/* order cards */
.d4u-order header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 17px; }
.d4u-order p { margin: 6px 0; }
.d4u-items, .entry-content .d4u-items { list-style: none; margin: 8px 0; padding: 0; border-top: 1px solid var(--line, #e5e7eb); }
.d4u-items li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.d4u-note { font-style: italic; color: var(--mute, #4b5563); }
.d4u-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--card2, #f3f4f6); border: 1px solid var(--line, #e5e7eb); }
.d4u-pill--ok { background: rgba(22, 163, 74, .12); border-color: rgba(22, 163, 74, .35); }
.d4u-pill--warn { background: rgba(217, 119, 6, .14); border-color: rgba(217, 119, 6, .4); }
.d4u-files { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.d4u-files a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line, #e5e7eb); }
.d4u-files img { display: block; width: 150px; height: 150px; object-fit: cover; }
.d4u-files span { display: block; padding: 12px 14px; }
.d4u-fill-row { display: grid; grid-template-columns: 1fr 84px; gap: 8px; margin-bottom: 8px; }
.d4u-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line, #e5e7eb); font-size: 15px; }
.d4u-route p { padding-left: 2px; }
.d4u-dot { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--em-text, #166534); margin-right: 8px; }
.d4u-dot--to { color: #b45309; }
.d4u-code-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.d4u-code-form .d4u-field { margin: 0; flex: 0 1 200px; }
.d4u-code-form input { letter-spacing: 6px; font-weight: 700; font-size: 20px; }
.d4u-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.d4u-stats span { display: block; font-size: 13px; color: var(--mute, #4b5563); }
.d4u-stats strong { font-size: 26px; }

/* shop + checkout */
.d4u-salt { display: block; font-size: 13px; color: var(--mute, #4b5563); margin: 2px 0 4px; line-height: 1.35; }
.d4u-rx-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(217, 119, 6, .15); color: #b45309; border: 1px solid rgba(217, 119, 6, .35); vertical-align: middle; }
:root[data-theme="dark"] .d4u-rx-tag { color: #fbbf24; }
.d4u-rx-note { padding: 12px 14px; border-radius: 12px; background: rgba(217, 119, 6, .1); border: 1px solid rgba(217, 119, 6, .35); }
.d4u-rxbox { margin: 22px 0; padding: 18px 20px; border-radius: 16px; border: 2px dashed var(--em-text, #1f5216); background: var(--card, #fff); }
.d4u-rxbox h3 { margin-top: 0; }
.d4u-file { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 12px; background: var(--em, #15370d); color: #fff; font-weight: 700; cursor: pointer; position: relative; overflow: hidden; }
.d4u-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.d4u-rx-list { list-style: none; margin: 10px 0 0; padding: 0; }
.d4u-rx-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; margin-bottom: 6px; }
.d4u-rx-del { background: none; border: 0; color: #b42318; font-weight: 600; cursor: pointer; padding: 4px 8px; }
.d4u-rx-msg { font-size: 14px; margin: 8px 0 0; color: var(--em-text, #166534); }
.d4u-rx-msg.bad { color: #b42318; }
.d4u-passbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; margin: 0 0 18px; border-radius: 16px; background: linear-gradient(135deg, #15370D, #1F4D14); color: #F1ECD6; }
.d4u-passbar strong { color: #E5CD82; }
.d4u-passbar span { font-size: 14px; color: #DDE7D6; }
.d4u-passbar.is-on { display: block; }
.d4u-account-links .button { margin: 0 8px 8px 0; }

/* tracking box */
.d4u-track { margin: 0 0 22px; padding: 18px 20px; border-radius: 18px; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); }
.d4u-steps { display: flex; list-style: none; margin: 0 0 12px; padding: 0; gap: 6px; counter-reset: s; flex-wrap: wrap; }
.d4u-steps li { flex: 1 1 90px; position: relative; padding-top: 30px; font-size: 13px; color: var(--mute, #4b5563); counter-increment: s; }
.d4u-steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--card2, #f3f4f6); border: 1px solid var(--line, #e5e7eb); }
.d4u-steps li.done { color: var(--ink, #111); }
.d4u-steps li.done::before { content: "✓"; background: #16a34a; border-color: #16a34a; color: #fff; }
.d4u-steps li.now { color: var(--ink, #111); font-weight: 700; }
.d4u-steps li.now::before { background: var(--gold, #e5cd82); border-color: var(--gold, #e5cd82); color: #1e1a08; }
.d4u-track__msg { font-size: 16px; }
.d4u-code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--card2, #fff8e1); }
.d4u-code strong { font-size: 28px; letter-spacing: 6px; }
.d4u-code span { font-size: 14px; color: var(--mute, #4b5563); }

/* "Check near you" on a medicine's page */
.d4u-avail { margin: 14px 0 18px; padding: 14px; border-radius: 14px; border: 1px solid var(--line, #e5e7eb); max-width: 460px; }
.d4u-avail label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.d4u-avail__row { display: flex; gap: 8px; }
.d4u-avail__row input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--outline, #cbd5e1); font: inherit; font-size: 16px; letter-spacing: .08em; background: transparent; color: inherit; }
.d4u-avail__row .button { min-height: 44px; }
.d4u-avail__msg { margin: 8px 0 0; font-size: 14px; }
.d4u-avail__msg:empty { display: none; }
.d4u-avail__msg.is-yes { color: #15803D; font-weight: 600; }
.d4u-avail__msg.is-out, .d4u-avail__msg.is-none { color: #B45309; }
.d4u-avail__msg.is-bad { color: #B91C1C; }
:root[data-theme="dark"] .d4u-avail__msg.is-yes { color: #86EFAC; }
:root[data-theme="dark"] .d4u-avail__msg.is-out, :root[data-theme="dark"] .d4u-avail__msg.is-none { color: #FCD34D; }
:root[data-theme="dark"] .d4u-avail__msg.is-bad { color: #FCA5A5; }
.d4u-pass .d4u-btn { margin-top: 4px; }

/* UPI QR popup (UPI QR Code Payment Gateway plugin): its box is always white, so its text must be dark —
   in the site's dark mode it was taking the light page text colour and could not be read. Brand colours too. */
.jconfirm { --upiwc-theme-color: #15370D; }
.jconfirm .jconfirm-box-container .jconfirm-box,
.jconfirm .jconfirm-box .jconfirm-content,
.jconfirm .jconfirm-box .upiwc-payment-content,
.jconfirm .jconfirm-box .upiwc-payment-info,
.jconfirm .jconfirm-box .upiwc-payment-info-text,
.jconfirm .jconfirm-box .upiwc-payment-hint,
.jconfirm .jconfirm-box .upiwc-payment-btn,
.jconfirm .jconfirm-box .upiwc-payment-confirm,
.jconfirm .jconfirm-box .upiwc-payment-confirm label { color: #171A1E; }
.jconfirm .jconfirm-box .upiwc-payment-content .upiwc-payment-actions .upiwc-payment-upi-id { color: #15370D; background-color: #EEF4EA; font-size: 13px; letter-spacing: .02em; }
.jconfirm .jconfirm-box .upiwc-payment-confirm input[type=text] { color: #171A1E; background: #fff; }
.jconfirm .jconfirm-box .upiwc-report-fraud-link,
.jconfirm .jconfirm-box .upiwc-report-fraud-link a { color: #4B5563; }
.jconfirm .jconfirm-box .jconfirm-buttons .btn.upiwc-amount { color: #171A1E !important; }

/* "Ordered most this week" shelf at the top of the medicine list */
.d4u-shelf { margin: 0 0 26px; }
.d4u-shelf h2 { font-family: var(--sans, inherit); font-size: 19px; margin: 0 0 12px; }
.d4u-shelf ul { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.d4u-shelf li { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px; border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); min-width: 0; }
.d4u-shelf__link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; flex: 1; }
.d4u-shelf__link img { width: 100%; height: 110px; object-fit: contain; border-radius: 10px; background: var(--card2, #f6f6f6); }
.d4u-shelf__name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.d4u-shelf__price { font-size: 14px; color: var(--mute, #4b5563); }
.d4u-shelf .d4u-shelf__add { text-align: center; min-height: 40px; }
.d4u-eta { margin: 4px 0 10px; font-weight: 700; font-size: 16px; color: var(--em-text, #166534); }

/* ---------- inside the dawa4u apps (see inc/app-mode.php) ---------- */
.d4u-tabbar { display: none; }
html.d4u-app .d4-footer,
html.d4u-app .d4-nav,
html.d4u-app .d4-menu-btn,
html.d4u-app .d4-cta { display: none !important; }
html.d4u-app--customer body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
html.d4u-app--customer .d4u-tabbar {
	display: grid; grid-template-columns: repeat(5, 1fr);
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
	background: var(--header-bg, #0B1708); backdrop-filter: blur(10px);
	border-top: 1px solid var(--line, rgba(255,255,255,.12));
}
.d4u-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; min-height: 48px; justify-content: center; text-decoration: none; color: var(--mute, #9CA3AF); font: 600 11.5px/1.1 var(--sans, system-ui, sans-serif); border-radius: 12px; }
.d4u-tabbar a.is-on { color: var(--em-text, #86EFAC); }
.d4u-tabbar a.is-on svg { stroke-width: 2.4; }
.d4u-tabbar a:active { background: var(--card2, rgba(255,255,255,.06)); }
html.d4u-app--rider .d4-cart { display: none !important; }
html.d4u-app .d4-main { padding-top: 8px; }
@media (min-width: 900px) { html.d4u-app--customer .d4u-tabbar { max-width: 640px; margin: 0 auto; border-radius: 18px 18px 0 0; } }
/* "View" buttons in My account → Orders were dark text on dark green */
.woocommerce-orders-table .woocommerce-button, .woocommerce-orders-table .button { color: #fff !important; }

/* mobile number + OTP log-in (inc/otp.php, assets/otp.js) */
.d4u-login { max-width: 860px; }
.d4u-otp { max-width: 460px; }
.d4u-login > .d4u-otp, .d4u-otp--link { margin: 0 0 18px; }
.d4u-login > .d4u-otp .d4u-otp__body { background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 18px; padding: 18px 20px; }
.d4u-otp__title { margin: 0 0 4px; font-family: var(--sans, inherit); font-size: 20px; }
.d4u-otp .d4u-small { margin: 0 0 14px; }
.d4u-field > .d4u-otp__tel { display: flex; align-items: stretch; margin: 0; font-weight: 400; }
.d4u-otp__tel input { flex: 1 1 auto; min-width: 0; }
.d4u-otp__cc { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--outline, #b9c7b3); border-right: 0; border-radius: 12px 0 0 12px; background: var(--card2, #f5f5f5); color: var(--ink, #111); font: 600 16px var(--sans, inherit); }
.d4u-otp .d4u-otp__tel input { border-radius: 0 12px 12px 0; letter-spacing: .04em; }
.d4u-otp .d4u-otp__code { letter-spacing: .4em; font-size: 22px; text-align: center; max-width: 240px; }
.d4u-otp .d4u-otp__go { width: 100%; }
.d4u-otp .d4u-actions .d4u-otp__go { width: auto; flex: 1 1 180px; }
.d4u-otp__go.is-busy { opacity: .7; cursor: progress; }
.d4u-otp__again:disabled { opacity: .6; cursor: default; }
.d4u-otp__msg { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; color: var(--mute, #4b5563); }
.d4u-otp__msg.is-bad { color: #b42318; font-weight: 600; }
html.dark .d4u-otp__msg.is-bad, [data-theme="dark"] .d4u-otp__msg.is-bad { color: #fca5a5; }
.d4u-otp__link { background: none; border: 0; padding: 0; color: var(--em-text, #1f5216); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.d4u-otp__switch { margin: 12px 0 0; }
/* the email form waits under "instead" while the OTP box is in front */
.d4u-login.is-otp:not(.d4u-login--web) .d4u-login__email,
html:not(.d4u-app) .d4u-login--web.is-otp .d4u-login__email { display: none; }
.d4u-login.is-otp .d4u-otp__phone, .d4u-login:not(.is-otp) .d4u-otp__email, .d4u-login:not(.is-otp) .d4u-otp__body { display: none; }
.d4u-login:not(.is-otp) > .d4u-otp { margin-bottom: 8px; }
/* "Website only": not shown inside the dawa4u apps */
html.d4u-app .d4u-otp--web { display: none !important; }
.d4u-otp-checkout { max-width: 520px; }
.d4u-otp-checkout summary { cursor: pointer; min-height: 30px; }
.d4u-otp-checkout[open] summary { margin-bottom: 12px; }
.d4u-otp-checkout .d4u-otp__title { display: none; }

/* ---------- prescription prices from nearby pharmacies (inc/quotes.php) ---------- */
.d4u-quotes { margin: 14px 0 6px; }
.d4u-quotes__h { margin: 0 0 4px; }
.d4u-quote { position: relative; margin: 12px 0; padding: 16px 18px; border: 1px solid var(--line, #e5e7eb); border-radius: 16px; background: var(--card, #fff); color: var(--ink, #1d2a17); }
.d4u-quote strong, .d4u-quote__lines span { color: inherit; }
.d4u-quote.is-best { border: 2px solid var(--gold, #c9a43c); box-shadow: 0 6px 18px rgba(201, 164, 60, .18); }
.d4u-quote header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.d4u-quote__best { padding: 3px 12px; border-radius: 999px; background: var(--gold, #c9a43c); color: var(--on-gold, #1e1a08); font-weight: 700; font-size: 13px; white-space: nowrap; }
.d4u-quote__lines { list-style: none; margin: 0 0 10px; padding: 0; }
.d4u-quote__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line, #e5e7eb); }
.d4u-quote__lines s { opacity: .6; margin-right: 4px; }
.d4u-quote__total { font-weight: 800; font-size: 17px; border-bottom: 0 !important; padding-top: 8px !important; }
.d4u-quote__save { margin: 0 0 10px; color: var(--em-text, #1f5216); font-weight: 700; }
.d4u-quote .button { min-height: 46px; }
.d4u-quotes__none { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line, #e5e7eb); }
.d4u-quotes__none p { margin: 0 0 6px; }
.d4u-quote__mine { padding: 10px 14px; border-radius: 12px; background: var(--hot, #fdf6e3); color: var(--ink, #1d2a17); }
.d4u-quotes__none .button { color: var(--ink, #1d2a17); background: transparent; border: 1.5px solid var(--outline, #b9c7b3); }
.d4u-qrow { display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px; gap: 8px; margin-bottom: 8px; align-items: center; }
.d4u-qrow--head { margin-bottom: 4px; }
.d4u-qrow select, .d4u-qrow input { min-height: 42px; width: 100%; }
@media (max-width: 520px) { .d4u-qrow { grid-template-columns: minmax(0, 1fr) 56px 90px; } }
