/* ═══════════════════════════════════════════════════════════════════════════
   OSTUKORVI LISAMISE TEAVITUSAKEN (14.09.2026)

   Eraldi failis, mitte tms-tokens.css sees: see aken peab laadima IGAL lehel,
   kus on ostunupp — sh avalehel, kus tms-tokens.css ei laadigi (see tuleb
   ainult pood/toode/ostukorv/kassa vaadetes). Oma fail hoiab need kaks
   laadimisreeglit lahus.

   Fail EI SÕLTU tms-tokens.css muutujatest — vt eelmine lõik, neid ei pruugi
   olemas olla. Värvid on siin otse.
   ═══════════════════════════════════════════════════════════════════════════ */

.tms-atc {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
.tms-atc[data-open="1"] {
	visibility: visible;
	pointer-events: auto;
}

.tms-atc__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 26, 0.55);
	opacity: 0;
	transition: opacity .2s ease;
}
.tms-atc[data-open="1"] .tms-atc__backdrop { opacity: 1; }

.tms-atc__panel {
	position: relative;
	width: 100%;
	max-width: 430px;
	background: #fff;
	border-radius: 12px;
	padding: 26px 24px 22px;
	box-sizing: border-box;
	box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
	font-family: 'IBM Plex Sans', system-ui, sans-serif;
	transform: translateY(12px) scale(0.98);
	opacity: 0;
	transition: transform .22s cubic-bezier(.4,0,.2,1), opacity .22s ease;
}
.tms-atc[data-open="1"] .tms-atc__panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.tms-atc__panel,
	.tms-atc__backdrop { transition: none; }
}

.tms-atc__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	border-radius: 6px;
	color: #6B7280;
	cursor: pointer;
}
.tms-atc__close:hover { background: #F3F4F6; color: #1C1F22; }

/* ── Kinnitusrida ──────────────────────────────────────────────────────── */
.tms-atc__flag {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 16px;
	padding-right: 34px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #2E7D4F;
}
.tms-atc__flag svg { flex: 0 0 auto; }

/* ── Toode ─────────────────────────────────────────────────────────────── */
.tms-atc__product {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	margin: 0 0 20px;
	background: #F6F8FB;
	border-radius: 8px;
}
.tms-atc__thumb {
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	background: #fff;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.tms-atc__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.tms-atc__name {
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.35;
	color: #123F6E;
	min-width: 0;
}

/* ── Nupud ─────────────────────────────────────────────────────────────── */
.tms-atc__actions {
	display: flex;
	gap: 10px;
}
.tms-atc__btn {
	flex: 1 1 0;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 46px;
	padding: 0 14px;
	border: 2px solid #123F6E;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.tms-atc__btn--primary {
	background: #123F6E;
	color: #fff;
}
.tms-atc__btn--primary:hover,
.tms-atc__btn--primary:focus {
	background: #0A2A5A;
	border-color: #0A2A5A;
	color: #fff;
}
.tms-atc__btn--ghost {
	background: #fff;
	color: #123F6E;
}
.tms-atc__btn--ghost:hover,
.tms-atc__btn--ghost:focus {
	background: #EEF3F9;
	color: #123F6E;
}

.tms-atc__cartlink {
	display: block;
	margin: 14px 0 0;
	text-align: center;
	font-size: 13.5px;
	font-weight: 600;
	color: #123F6E;
	text-decoration: none;
}
.tms-atc__cartlink:hover { text-decoration: underline; color: #123F6E; }

/* ── Mobiil ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.tms-atc { padding: 0; align-items: flex-end; }
	.tms-atc__panel {
		max-width: none;
		border-radius: 14px 14px 0 0;
		padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
		transform: translateY(100%);
	}
	.tms-atc[data-open="1"] .tms-atc__panel { transform: translateY(0); }

	/* Kitsal ekraanil kaks nuppu kõrvuti murraks teksti — pane üksteise alla. */
	.tms-atc__actions { flex-direction: column; }
	.tms-atc__btn { width: 100%; }
}
