/*
 * Ketabbin 5.2.7 — authoritative light-only storefront.
 * This file intentionally loads last and neutralizes every legacy dark-mode
 * selector, saved browser preference, or OS dark preference.
 */

:root,
html,
html[data-theme],
html[data-theme="light"],
html[data-theme="dark"],
body,
body[data-theme],
body.dark-mode {
	color-scheme: light !important;
	--kb-ink: #102238 !important;
	--kb-text: #263445 !important;
	--kb-muted: #687386 !important;
	--kb-canvas: #fffaf2 !important;
	--kb-paper: #fffaf2 !important;
	--kb-surface: #ffffff !important;
	--kb-surface-2: #fff6e8 !important;
	--kb-line: rgba(16, 34, 56, .12) !important;
	--kb-line-strong: rgba(251, 169, 11, .36) !important;
	--kb-gold: #fba90b !important;
	--kb-gold-soft: #fff2d2 !important;
	--kb-orange: #f59e0b !important;
	--kb-brand-navy: #102238 !important;
	--kb-midnight: #102238 !important;
	--kb-balanced-night: #102238 !important;
	--kb-dark-text-strong: #102238 !important;
	--kb-dark-text: #263445 !important;
	--kb-dark-text-muted: #687386 !important;
	--kb-shadow-1: 0 12px 32px rgba(16, 34, 56, .08) !important;
	--kb-shadow-2: 0 26px 70px rgba(16, 34, 56, .14) !important;
	--paper: #fffaf2 !important;
	--surface: #ffffff !important;
	--surface-2: #fff6e8 !important;
	--text: #263445 !important;
	--muted: #687386 !important;
	--line: rgba(16, 34, 56, .12) !important;
	--line-strong: rgba(251, 169, 11, .36) !important;
}

html[data-theme],
html[data-theme="dark"] body,
body.dark-mode,
body[data-theme="dark"] {
	background: #fffaf2 !important;
	color: #263445 !important;
}

html[data-theme] body::before,
html[data-theme="dark"] body::before,
body.dark-mode::before {
	background:
		radial-gradient(circle at top right, rgba(251, 169, 11, .10), transparent 32rem),
		linear-gradient(180deg, #fffaf2 0%, #fffdfa 46%, #fff7ea 100%) !important;
	opacity: 1 !important;
}

html[data-theme="dark"] :is(
	.kb-commerce-header,
	.kb-v2-header,
	.kb-v2-nav-wrap,
	.kb-mobile-store-nav,
	.kb-bottom-nav,
	.kb-store-card,
	.kb-v2-product-card,
	.kb-wc-system-page,
	.kb-wc-system-page__body,
	.kb-auth-panel,
	.kb-account,
	.kb-member-dashboard,
	.woocommerce-cart-form,
	.cart-collaterals,
	.woocommerce-checkout-review-order,
	form.checkout,
	.woocommerce form .form-row input.input-text,
	.woocommerce form .form-row textarea,
	.woocommerce form .form-row select
),
body.dark-mode :is(
	.kb-commerce-header,
	.kb-v2-header,
	.kb-v2-nav-wrap,
	.kb-mobile-store-nav,
	.kb-bottom-nav,
	.kb-store-card,
	.kb-v2-product-card,
	.kb-wc-system-page,
	.kb-wc-system-page__body,
	.kb-auth-panel,
	.kb-account,
	.kb-member-dashboard,
	.woocommerce-cart-form,
	.cart-collaterals,
	.woocommerce-checkout-review-order,
	form.checkout,
	.woocommerce form .form-row input.input-text,
	.woocommerce form .form-row textarea,
	.woocommerce form .form-row select
) {
	background-color: #ffffff !important;
	color: #263445 !important;
	border-color: rgba(16, 34, 56, .12) !important;
}

html[data-theme="dark"] :is(h1, h2, h3, h4, h5, h6, strong, label, th, .price, .amount),
body.dark-mode :is(h1, h2, h3, h4, h5, h6, strong, label, th, .price, .amount) {
	color: #102238 !important;
	-webkit-text-fill-color: #102238 !important;
}

html[data-theme="dark"] :is(p, li, td, small, em, span, a:not(.button):not(.kb-button)),
body.dark-mode :is(p, li, td, small, em, span, a:not(.button):not(.kb-button)) {
	color: inherit;
}

html[data-theme="dark"] :is(.kb-muted, .kb-store-card__meta, .woocommerce-breadcrumb, .woocommerce-result-count),
body.dark-mode :is(.kb-muted, .kb-store-card__meta, .woocommerce-breadcrumb, .woocommerce-result-count) {
	color: #687386 !important;
	-webkit-text-fill-color: #687386 !important;
}

html[data-theme="dark"] :is(.button, button, .kb-button, .single_add_to_cart_button, .checkout-button),
body.dark-mode :is(.button, button, .kb-button, .single_add_to_cart_button, .checkout-button) {
	color-scheme: light !important;
}

html[data-theme="dark"] .kb-default-logo__dark,
body.dark-mode .kb-default-logo__dark {
	display: block !important;
}

html[data-theme="dark"] .kb-default-logo__light,
body.dark-mode .kb-default-logo__light {
	display: none !important;
}

.kb-v2-theme-toggle,
[data-kb-theme],
[data-kb-theme="dark"],
.kb-command-quick-theme {
	display: none !important;
}

.kb-auth-body,
html[data-theme="dark"] .kb-auth-body,
body.dark-mode.kb-auth-body {
	background: #fffaf2 !important;
	color: #263445 !important;
}

.kb-auth-logo .kb-default-logo__light,
.kb-auth-logo img + img {
	display: none !important;
}

.kb-auth-logo img,
.kb-auth-card-logo img {
	opacity: 1 !important;
	filter: none !important;
}

.kb-auth-visual,
html[data-theme="dark"] .kb-auth-visual,
body.dark-mode .kb-auth-visual {
	background: linear-gradient(135deg, #fff8ea 0%, #ffffff 46%, #edf7fb 100%) !important;
	color: #263445 !important;
}

.kb-auth-visual::before,
html[data-theme="dark"] .kb-auth-visual::before,
body.dark-mode .kb-auth-visual::before {
	background:
		radial-gradient(circle at 24% 18%, rgba(251, 169, 11, .20), transparent 19rem),
		radial-gradient(circle at 78% 78%, rgba(30, 88, 120, .12), transparent 22rem) !important;
}

@media (max-width: 900px) {
	.kb-auth-visual {
		display: none !important;
	}

	.kb-auth-shell {
		display: block !important;
		width: min(460px, calc(100% - 24px)) !important;
		margin-inline: auto !important;
	}
}

.kbc-phone-auth__field > div {
	direction: ltr !important;
	grid-template-columns: auto minmax(0, 1fr) !important;
}

.kbc-phone-auth__field > div > b {
	order: 0 !important;
	min-width: 58px !important;
	height: 100% !important;
	display: inline-grid !important;
	place-items: center !important;
	border-inline-end: 1px solid rgba(16, 34, 56, .10) !important;
	border-inline-start: 0 !important;
	background: #eef3f6 !important;
	color: #4f5f72 !important;
}

.kbc-phone-auth__field input[type="tel"],
.kbc-phone-auth__field input[data-kbc-otp-phone] {
	order: 1 !important;
	direction: ltr !important;
	text-align: left !important;
	padding-inline: 14px !important;
}

.kbc-phone-auth__submit,
.kb-auth-submit {
	background: #fbaa0e !important;
	color: #041428 !important;
	box-shadow: 0 14px 28px rgba(251, 170, 14, .22) !important;
}

.kbc-phone-auth__submit:hover,
.kb-auth-submit:hover {
	background: #f5a000 !important;
	color: #041428 !important;
}

.kb-auth-shell .kbc-phone-auth__hint,
.kb-auth-shell .kb-auth-security,
.kb-auth-shell .kb-auth-admin-link,
.kb-auth-shell .kb-auth-eyebrow,
.kb-auth-shell .kb-auth-panel h1 + p {
	display: none !important;
}

.kb-auth-shell .kbc-phone-auth__terms span {
	font-size: 0 !important;
}

.kb-auth-shell .kbc-phone-auth__terms span::before {
	content: "قوانین و حریم خصوصی را می‌پذیرم.";
	font-size: 10px !important;
}

body.kb-auth-body {
	display: flex !important;
	min-height: 100vh !important;
	flex-direction: column !important;
	background: linear-gradient(180deg, #fffaf2 0%, #ffffff 42%, #fffaf2 100%) !important;
}

body.kb-auth-body .kb-auth-shell {
	align-self: center !important;
	margin: auto !important;
	border-color: rgba(4, 20, 40, .10) !important;
	box-shadow: 0 24px 70px rgba(4, 20, 40, .08) !important;
}

body.kb-auth-body .kb-auth-footer {
	margin-top: auto !important;
	justify-content: center !important;
}

body.kb-auth-body .kbc-phone-auth__field > span {
	margin-bottom: 8px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #344054 !important;
}

body.kb-auth-body .kbc-phone-auth__field > div {
	height: 48px !important;
	border-radius: 8px !important;
	background: #ffffff !important;
	border-color: #d0d5dd !important;
}

body.kb-auth-body .kbc-phone-auth__field input[data-kbc-otp-phone] {
	font-size: 14px !important;
}

body.kb-auth-body .kbc-phone-auth__submit {
	min-height: 52px !important;
	border-radius: 10px !important;
	font-size: 14px !important;
}
