/**
 * LMO — sepet uyarıları, satır rozetleri, lokasyon modalı.
 * Bağımlılık: lmo-tokens.css
 */

/* —— Sepet kapısı —— */
.lmo-cart-gate {
	margin-bottom: 1.25rem;
	font-family: var(--lmo-font);
	color: var(--lmo-ink);
}

.lmo-cart-gate--collateral {
	clear: both;
	width: 100%;
	box-sizing: border-box;
}

.lmo-cart-gate-inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.lmo-notice {
	padding: 1rem 1.125rem;
	border-radius: var(--lmo-radius-md);
	margin-bottom: 0;
	border: 1px solid var(--lmo-border);
	background: var(--lmo-surface-elevated);
	box-shadow: var(--lmo-shadow-sm);
}

.lmo-notice--prompt {
	background: linear-gradient(135deg, var(--lmo-surface) 0%, var(--lmo-brand-softer) 100%);
	border-color: rgba(138, 2, 4, 0.18);
}

.lmo-notice--amount {
	background: var(--lmo-surface);
	border-color: var(--lmo-border-strong);
}

.lmo-notice p,
.lmo-prompt-text {
	margin: 0 0 0.5rem;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--lmo-ink-secondary);
}

.lmo-prompt-text:last-child {
	margin-bottom: 0;
}

.lmo-notice__lead {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--lmo-ink);
	font-weight: 500;
}

.lmo-notice__lead strong .woocommerce-Price-amount {
	font-weight: 700;
	color: var(--lmo-brand);
}

.lmo-mini-breakdown {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	line-height: 1.45;
}

.lmo-mini-breakdown th,
.lmo-mini-breakdown td {
	padding: 0.5rem 0.5rem 0.5rem 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--lmo-border);
	word-break: break-word;
}

.lmo-mini-breakdown th {
	font-weight: 600;
	color: var(--lmo-muted);
	padding-right: 0.75rem;
	font-size: 0.8125rem;
	text-transform: none;
	letter-spacing: 0.01em;
}

.lmo-mini-breakdown tr:last-child th,
.lmo-mini-breakdown tr:last-child td {
	border-bottom: none;
}

.lmo-mini-breakdown td {
	text-align: right;
	white-space: nowrap;
	color: var(--lmo-ink);
	font-variant-numeric: tabular-nums;
}

.lmo-notice__note {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--lmo-muted);
}

/* Butonlar (Woo .button ile uyum) */
.lmo-cart-gate .lmo-open-modal.button,
.lmo-cart-gate .lmo-open-modal.lmo-btn {
	margin-top: 0.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.65rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.25;
	border-radius: var(--lmo-radius-sm);
	border: none;
	cursor: pointer;
	transition: background var(--lmo-transition), color var(--lmo-transition), box-shadow var(--lmo-transition);
	font-family: var(--lmo-font);
	background: var(--lmo-brand);
	color: #fff !important;
	box-shadow: 0 1px 2px rgba(138, 2, 4, 0.2);
}

.lmo-cart-gate .lmo-open-modal.button:hover,
.lmo-cart-gate .lmo-open-modal.lmo-btn:hover {
	background: var(--lmo-brand-hover);
	color: #fff !important;
	box-shadow: 0 2px 8px rgba(138, 2, 4, 0.25);
}

.lmo-cart-gate .lmo-open-modal.button:focus,
.lmo-cart-gate .lmo-open-modal.lmo-btn:focus {
	outline: none;
	box-shadow: var(--lmo-focus-ring);
}

.lmo-notice--amount .lmo-open-modal.button-link {
	margin-top: 0.5rem;
	padding: 0;
	background: none;
	border: none;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--lmo-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	font-family: var(--lmo-font);
}

.lmo-notice--amount .lmo-open-modal.button-link:hover {
	color: var(--lmo-brand-hover);
}

.lmo-cart-gate-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.65rem;
	margin-top: 0.75rem;
}

.lmo-cart-gate-actions .lmo-change-address.button-link {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--lmo-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	font-family: var(--lmo-font);
	text-align: center;
}

.lmo-cart-gate-actions .lmo-change-address.button-link:hover {
	color: var(--lmo-brand-hover);
}

.lmo-cart-gate-actions .checkout-button,
.lmo-cart-gate-actions a.checkout-button {
	width: 100%;
	text-align: center;
}

/* Satır rozeti */
.lmo-cart-line-badge {
	display: block;
	margin-top: 0.4rem;
	margin-bottom: 0.1rem;
}

.lmo-cart-line-badge__text {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	font-size: 0.75rem;
	line-height: 1.4;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: 999px;
	font-family: var(--lmo-font);
}

.lmo-cart-line-badge--local .lmo-cart-line-badge__text {
	background: var(--lmo-brand-soft);
	color: var(--lmo-brand);
	border: 1px solid rgba(138, 2, 4, 0.2);
}

.lmo-cart-line-badge--cargo .lmo-cart-line-badge__text {
	background: var(--lmo-cargo-soft);
	color: var(--lmo-cargo);
	border: 1px solid rgba(12, 74, 110, 0.2);
}

.lmo-cart-line-badge--both .lmo-cart-line-badge__text {
	background: rgba(68, 64, 60, 0.08);
	color: var(--lmo-ink-secondary);
	border: 1px solid var(--lmo-border);
}

.lmo-modal__mixed-hint {
	margin: 0 0 1rem;
	padding: 0.75rem 0.875rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--lmo-ink-secondary);
	background: var(--lmo-surface-elevated);
	border-radius: var(--lmo-radius-sm);
	border: 1px solid var(--lmo-border);
}

.lmo-hidden {
	display: none !important;
}

body.lmo-modal-open {
	overflow: hidden;
}

/* —— Modal kök —— */
#lmo-modal-root {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: var(--lmo-overlay);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	font-family: var(--lmo-font);
}

#lmo-modal-root[hidden] {
	display: none !important;
}

.lmo-modal {
	background: var(--lmo-surface);
	max-width: 28rem;
	width: 100%;
	border-radius: var(--lmo-radius-lg);
	box-shadow: var(--lmo-shadow-lg);
	position: relative;
	outline: none;
	overflow: hidden;
	border: 1px solid var(--lmo-border);
}

.lmo-modal__inner {
	padding: 0;
	display: flex;
	flex-direction: column;
	max-height: min(90vh, 36rem);
}

.lmo-modal__header {
	padding: 1.25rem 1.5rem 1rem;
	border-bottom: 1px solid var(--lmo-border);
	background: linear-gradient(180deg, var(--lmo-surface) 0%, var(--lmo-surface-elevated) 100%);
}

.lmo-modal__title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--lmo-ink);
	letter-spacing: -0.02em;
	padding-right: 2.5rem;
}

.lmo-modal__close {
	position: absolute;
	top: 0.875rem;
	right: 0.875rem;
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	border-radius: var(--lmo-radius-sm);
	background: transparent;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	color: var(--lmo-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--lmo-transition), color var(--lmo-transition);
}

.lmo-modal__close:hover {
	background: var(--lmo-brand-softer);
	color: var(--lmo-brand);
}

.lmo-modal__close:focus {
	outline: none;
	box-shadow: var(--lmo-focus-ring);
}

.lmo-modal__close-icon {
	font-size: 1.5rem;
	line-height: 1;
	font-weight: 300;
}

.lmo-modal__body {
	padding: 1rem 1.5rem;
	overflow-y: auto;
	flex: 1 1 auto;
}

.lmo-modal__footer {
	padding: 1rem 1.5rem 1.25rem;
	border-top: 1px solid var(--lmo-border);
	background: var(--lmo-surface-elevated);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.lmo-modal__tabs {
	display: flex;
	gap: 0.35rem;
	margin-bottom: 1rem;
	padding: 0.2rem;
	background: var(--lmo-surface-elevated);
	border-radius: var(--lmo-radius-sm);
	border: 1px solid var(--lmo-border);
}

.lmo-modal__tabs .lmo-tab {
	flex: 1;
	margin: 0 !important;
	padding: 0.55rem 0.65rem !important;
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	border: none !important;
	border-radius: calc(var(--lmo-radius-sm) - 2px) !important;
	background: transparent !important;
	color: var(--lmo-muted) !important;
	cursor: pointer;
	font-family: var(--lmo-font) !important;
	transition: background var(--lmo-transition), color var(--lmo-transition);
	box-shadow: none !important;
}

.lmo-modal__tabs .lmo-tab:hover {
	color: var(--lmo-ink-secondary) !important;
	background: rgba(255, 255, 255, 0.6) !important;
}

.lmo-modal__tabs .lmo-tab.is-active {
	background: var(--lmo-surface) !important;
	color: var(--lmo-brand) !important;
	box-shadow: var(--lmo-shadow-sm) !important;
}

.lmo-panel--hood .lmo-modal__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.lmo-panel--hood .lmo-modal__row:last-child {
	margin-bottom: 0;
}

.lmo-panel--hood .lmo-modal__row--city {
	grid-template-columns: 1fr;
}

@media (max-width: 480px) {
	.lmo-panel--hood .lmo-modal__row {
		grid-template-columns: 1fr;
	}
}

.lmo-panel--external {
	padding-top: 0.25rem;
}

.lmo-panel--external .description {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--lmo-muted);
}

.lmo-select {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--lmo-border-strong);
	border-radius: var(--lmo-radius-sm);
	font-size: 0.875rem;
	font-family: var(--lmo-font);
	color: var(--lmo-ink);
	background: var(--lmo-surface);
	transition: border-color var(--lmo-transition), box-shadow var(--lmo-transition);
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2378716c' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.65rem center;
	padding-right: 2rem;
}

.lmo-select:hover {
	border-color: rgba(138, 2, 4, 0.35);
}

.lmo-select:focus {
	outline: none;
	border-color: var(--lmo-brand);
	box-shadow: var(--lmo-focus-ring);
}

.lmo-modal__actions {
	display: flex;
	justify-content: flex-end;
	margin: 0;
}

.lmo-modal__submit {
	min-width: 7.5rem;
	margin: 0 !important;
	padding: 0.65rem 1.35rem !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	border-radius: var(--lmo-radius-sm) !important;
	border: none !important;
	background: var(--lmo-brand) !important;
	color: #fff !important;
	font-family: var(--lmo-font) !important;
	cursor: pointer;
	transition: background var(--lmo-transition), box-shadow var(--lmo-transition);
	box-shadow: 0 1px 2px rgba(138, 2, 4, 0.2) !important;
}

.lmo-modal__submit:hover {
	background: var(--lmo-brand-hover) !important;
	box-shadow: 0 2px 10px rgba(138, 2, 4, 0.22) !important;
}

.lmo-modal__submit:focus {
	outline: none;
	box-shadow: var(--lmo-focus-ring) !important;
}

.lmo-modal__error {
	color: var(--lmo-danger);
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	padding: 0.5rem 0.65rem;
	background: var(--lmo-danger-soft);
	border-radius: var(--lmo-radius-sm);
	border: 1px solid rgba(180, 35, 24, 0.2);
}

.lmo-modal__error[hidden] {
	display: none !important;
}

