/* Окно выбора мест. Стили самодостаточные: повторяют шаблон .announce-modal
   (белая карточка, радиус 16px, тень, крестик-круг, кнопка #652046), но не зависят от того,
   подключены ли на сайте стили .announce-modal и окна выбора билетов. */

.mfp-announce.mfp-bg { background: rgba(15,23,42,.55); backdrop-filter: blur(4px); opacity: 1; }
/* .mfp-wrap в селекторе — чтобы перебить .mfp-announce .mfp-content { max-width: 440px } окна билетов */
.mfp-wrap.mfp-seats .mfp-content { max-width: 1120px; width: 100%; }
.mfp-wrap.mfp-seats .mfp-container { padding: 16px; }

.mfp-seats .announce-modal__inner.tk-seats {
	box-sizing: border-box;
	width: 100%;
	max-width: 1120px;
	height: min(820px, 92vh);
	max-height: 92vh;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	animation: tkSeatsPop .35s ease;
	/* шрифт окна — поменяй на шрифт сайта, если нужно */
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: #0f172a;
	text-align: left;
	line-height: 1.4;
}
.tk-seats *, .tk-seats *::before, .tk-seats *::after { box-sizing: border-box; }
/* сброс стилей списков сайта (отступы, маркеры через ::before) */
.tk-seats ul, .tk-seats li { margin: 0; list-style: none; }
.tk-seats ul { padding: 0; }
.tk-seats li::before, .tk-seats li::marker { content: none; }
@keyframes tkSeatsPop { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }

.tk-seats .announce-modal__close {
	position: absolute; top: 12px; right: 14px; z-index: 6;
	width: 34px; height: 34px;
	display: inline-flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.9); border-radius: 50%;
	font-size: clamp(18px, 4.5vw, 20px); line-height: 1; color: #1e293b;
	cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15);
	transition: background .2s;
}
.tk-seats .announce-modal__close:hover { background: #fff; }

.tk-seats .announce-modal__title {
	margin: 0; padding: 0;
	font-family: inherit; font-weight: 700;
	font-size: clamp(18px, 4.6vw, 20px); line-height: 1.3; color: #0f172a;
	text-transform: none; letter-spacing: 0;
}

.tk-seats .announce-modal__link {
	display: block; width: 100%;
	padding: 12px 20px; border-radius: 10px;
	background: #652046; color: #fff !important;
	font-family: inherit; font-weight: 700; font-size: clamp(14px, 3.6vw, 15px);
	text-align: center; text-decoration: none;
	box-shadow: 0 6px 16px #65204659;
	transition: opacity .2s;
}
.tk-seats .announce-modal__link:hover { opacity: .9; }

.tk-seats.is-busy .tk-seats__canvas { cursor: progress; }

.tk-seats__head { padding: 20px 64px 12px 24px; border-bottom: 1px solid #e2e8f0; }
.tk-seats__date { margin-top: 4px; font-size: clamp(13px, 3.4vw, 14.5px); color: #475569; }

.tk-seats__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 300px; }

/* ---------- схема ---------- */
.tk-seats__stage { position: relative; min-width: 0; min-height: 0; background: #f8fafc; }
.tk-seats__canvas {
	position: absolute; inset: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	padding: 16px;
}
.tk-seats__canvas svg { display: block; width: 100%; height: auto; max-width: none; }
.tk-seats__canvas text { pointer-events: none; user-select: none; }
.tk-seats__loading { padding: 40px 0; text-align: center; color: #475569; font-size: clamp(14px, 3.6vw, 15px); }

.tk-seats__tools { position: absolute; z-index: 2; right: 14px; top: 14px; display: flex; gap: 6px; }
.tk-seats__tool {
	font-family: inherit; font-weight: 400; text-transform: none; letter-spacing: 0;
	display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
	min-width: 36px; height: 36px; padding: 0 10px;
	border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #0f172a;
	font-size: clamp(16px, 4vw, 18px); line-height: 1; cursor: pointer;
	box-shadow: 0 2px 8px rgba(15,23,42,.08);
}
.tk-seats__tool--wide { font-size: clamp(12px, 3.2vw, 13px); }
.tk-seats__tool:hover { background: #f1f5f9; }

/* состояния мест и столов */
.tk-place { cursor: pointer; transition: fill .15s, fill-opacity .15s, stroke-width .15s; }
.tk-place.tk-free,
.tk-place.tk-free * { fill: var(--zone, #8a93b0) !important; fill-opacity: 1 !important; }
.tk-place--table.tk-free,
.tk-place--table.tk-free * { fill-opacity: .28 !important; }
.tk-place.tk-free:hover,
.tk-place.tk-free:hover * { stroke: #0f172a !important; stroke-width: 3px !important; }
.tk-place--table.tk-free:hover,
.tk-place--table.tk-free:hover * { fill-opacity: .5 !important; }

.tk-place.tk-mine,
.tk-place.tk-mine * { fill: #652046 !important; fill-opacity: 1 !important; }
.tk-place--table.tk-mine,
.tk-place--table.tk-mine * { fill-opacity: .85 !important; }

.tk-place.tk-busy,
.tk-place.tk-busy * { fill: #d3d7e0 !important; fill-opacity: 1 !important; cursor: not-allowed; }
.tk-place.tk-off,
.tk-place.tk-off * { fill: #eceef3 !important; fill-opacity: 1 !important; cursor: default; }

/* подсказка */
.tk-seats__tip {
	position: absolute; z-index: 3; pointer-events: none;
	display: none; flex-direction: column; gap: 2px;
	padding: 8px 10px; border-radius: 8px;
	background: #0f172a; color: #fff;
	font-size: clamp(12px, 3.2vw, 13px); line-height: 1.35; white-space: nowrap;
	box-shadow: 0 6px 16px rgba(15,23,42,.25);
}
.tk-seats__tip.is-on { display: flex; }
.tk-seats__tip b { font-family: inherit; font-weight: 700; }
.tk-seats__tip em { font-style: normal; opacity: .75; }

/* ---------- боковая панель ---------- */
.tk-seats__side {
	display: flex; flex-direction: column; gap: 18px;
	padding: 20px; border-left: 1px solid #e2e8f0;
	overflow-y: auto;
}
.tk-seats__legend,
.tk-seats__states,
.tk-seats__mine-list { margin: 0; padding: 0; list-style: none; }
.tk-seats__legend li,
.tk-seats__states li,
.tk-seats__mine-list li { list-style: none; }

.tk-seats__legend li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.tk-seats__legend b { display: block; font-family: inherit; font-weight: 700; font-size: clamp(14px, 3.6vw, 15px); color: #0f172a; }
.tk-seats__legend small { display: block; font-size: clamp(12.5px, 3.3vw, 13.5px); color: #475569; }

.tk-seats__states { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: clamp(12.5px, 3.3vw, 13.5px); color: #475569; }
.tk-seats__states li { display: flex; align-items: center; gap: 6px; }

.tk-dot { flex: 0 0 auto; display: inline-block; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; }
.tk-seats__states .tk-dot { margin-top: 0; }
.tk-dot--free { background: #8a93b0; }
.tk-dot--mine { background: #652046; }
.tk-dot--busy { background: #d3d7e0; }

.tk-seats__mine { padding-top: 14px; border-top: 1px solid #e2e8f0; }
.tk-seats__mine-title { margin-bottom: 8px; font-family: inherit; font-weight: 700; font-size: clamp(15px, 3.8vw, 16px); color: #0f172a; }
.tk-seats__mine-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f1f5f9; font-size: clamp(13.5px, 3.5vw, 14.5px); color: #0f172a; }
.tk-seats__mine-list li small { display: block; color: #475569; font-size: clamp(12.5px, 3.3vw, 13.5px); }
.tk-seats__mine-list button { flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f1f5f9; color: #475569; font-size: clamp(16px, 4vw, 18px); line-height: 1; cursor: pointer; }
.tk-seats__mine-list button:hover { background: #fde8ef; color: #652046; }
.tk-seats__mine-list .tk-seats__empty { display: block; border: 0; color: #64748b; }
.tk-seats__total { margin-top: 10px; font-size: clamp(15px, 3.8vw, 16px); color: #0f172a; }
.tk-seats__total b { font-family: inherit; font-weight: 700; font-size: clamp(18px, 4.6vw, 20px); }
.tk-seats__note { margin-top: 4px; font-size: clamp(12px, 3.2vw, 13px); color: #64748b; }

.tk-seats__side .announce-modal__link { margin-top: auto; position: sticky; bottom: 0; flex-shrink: 0; }
.tk-seats__side .announce-modal__link.is-disabled { opacity: .45; box-shadow: none; }

/* сообщение об ошибке */
.tk-seats__toast {
	position: absolute; left: 50%; bottom: 20px; z-index: 5;
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 10px;
	background: #0f172a; color: #fff; font-size: clamp(13px, 3.4vw, 14px);
	transition: opacity .2s, transform .2s;
}
.tk-seats__toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- телефон ---------- */
@media (max-width: 860px) {
	.mfp-wrap.mfp-seats .mfp-container { padding: 0; }
	.mfp-seats .announce-modal__inner.tk-seats { height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
	.tk-seats__body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
	.tk-seats__side { border-left: 0; border-top: 1px solid #e2e8f0; max-height: 42vh; padding: 14px 16px; gap: 12px; }
	.tk-seats__legend { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
	.tk-seats__tip { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	.tk-place, .tk-seats__toast { transition: none; }
}