/* DP Tickets — форма покупки билетов.
   Стили нарочно «нейтральные» и на CSS-переменных: тема сайта может
   переопределить цвета, не трогая разметку. */

.dp-tickets {
	--dp-bg: #ffffff;
	--dp-fg: #18181b;
	--dp-muted: #6b7280;
	--dp-line: #e4e4e7;
	--dp-accent: #111827;
	--dp-accent-fg: #ffffff;
	--dp-radius: 12px;

	max-width: 720px;
	margin: 32px 0;
	color: var(--dp-fg);
	font-size: 16px;
	line-height: 1.5;
}

.dp-tickets * {
	box-sizing: border-box;
}

.dp-tickets__title {
	margin: 0 0 16px;
	font-size: 22px;
	font-weight: 700;
}

/* --- Уведомления --- */

.dp-notice {
	padding: 14px 16px;
	border-radius: var(--dp-radius);
	margin-bottom: 16px;
	font-size: 15px;
	border: 1px solid transparent;
}

.dp-notice__title {
	font-weight: 700;
	font-size: 17px;
	margin-bottom: 4px;
}

.dp-notice p {
	margin: 0;
}

.dp-notice--success {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
}

.dp-notice--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.dp-notice--info {
	background: #f4f4f5;
	border-color: var(--dp-line);
	color: #3f3f46;
}

/* --- Типы билетов --- */

.dp-tiers {
	border: 1px solid var(--dp-line);
	border-radius: var(--dp-radius);
	overflow: hidden;
}

.dp-tier {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border-bottom: 1px solid var(--dp-line);
	background: var(--dp-bg);
}

.dp-tier:last-child {
	border-bottom: 0;
}

.dp-tier--out {
	opacity: 0.55;
}

.dp-tier__main {
	flex: 1 1 auto;
	min-width: 0;
}

.dp-tier__name {
	font-weight: 600;
}

.dp-tier__desc {
	font-size: 14px;
	color: var(--dp-muted);
	margin-top: 2px;
}

.dp-tier__left {
	font-size: 13px;
	color: #b45309;
	margin-top: 4px;
	font-weight: 600;
}

.dp-tier__price {
	flex: 0 0 auto;
	font-weight: 700;
	white-space: nowrap;
}

.dp-tier__qty {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.dp-tier__out {
	font-size: 14px;
	color: var(--dp-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dp-step {
	width: 34px;
	height: 34px;
	border: 1px solid var(--dp-line);
	border-radius: 8px;
	background: var(--dp-bg);
	color: var(--dp-fg);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.dp-step:hover:not(:disabled) {
	border-color: var(--dp-accent);
}

.dp-step:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.dp-qty {
	width: 48px;
	height: 34px;
	text-align: center;
	border: 1px solid var(--dp-line);
	border-radius: 8px;
	background: var(--dp-bg);
	color: var(--dp-fg);
	font-size: 15px;
	padding: 0;
	-moz-appearance: textfield;
}

.dp-qty::-webkit-outer-spin-button,
.dp-qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* --- Итого --- */

.dp-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	margin-top: 4px;
	font-size: 18px;
	border-bottom: 1px solid var(--dp-line);
}

.dp-total__value {
	font-size: 22px;
	font-weight: 700;
}

/* --- Поля покупателя --- */

.dp-buyer {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin: 20px 0;
}

.dp-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.dp-field:first-child {
	grid-column: 1 / -1;
}

.dp-field__label {
	font-size: 14px;
	font-weight: 600;
}

.dp-field__label em {
	color: #dc2626;
	font-style: normal;
}

.dp-field__hint {
	font-size: 13px;
	color: var(--dp-muted);
}

.dp-field input {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--dp-line);
	border-radius: 8px;
	background: var(--dp-bg);
	color: var(--dp-fg);
	font-size: 16px; /* < 16px заставляет iOS зумить страницу при фокусе */
}

.dp-field input:focus {
	outline: 2px solid var(--dp-accent);
	outline-offset: 1px;
	border-color: transparent;
}

/* --- Кнопка --- */

.dp-submit {
	width: 100%;
	height: 52px;
	border: 0;
	border-radius: 10px;
	background: var(--dp-accent);
	color: var(--dp-accent-fg);
	font-size: 17px;
	font-weight: 600;
	cursor: pointer;
}

.dp-submit:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.dp-submit.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.dp-secure {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--dp-muted);
	text-align: center;
}

/* --- Ловушка для ботов --- */

.dp-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Купленные билеты --- */

.dp-my-tickets {
	display: grid;
	gap: 12px;
}

.dp-my-ticket {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 16px;
	border: 2px dashed var(--dp-line);
	border-radius: var(--dp-radius);
	text-decoration: none;
	color: var(--dp-fg);
}

.dp-my-ticket:hover {
	border-color: var(--dp-accent);
}

.dp-my-ticket__tier {
	font-weight: 600;
}

.dp-my-ticket__code {
	font-family: "Courier New", monospace;
	font-size: 18px;
	letter-spacing: 2px;
	font-weight: 700;
}

.dp-my-ticket__link {
	margin-left: auto;
	font-size: 14px;
	color: #2563eb;
}

/* --- Список событий --- */

.dp-events {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.dp-event-card {
	border: 1px solid var(--dp-line, #e4e4e7);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
}

.dp-event-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.dp-event-card__img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	width: 100%;
	display: block;
}

.dp-event-card__body {
	padding: 14px 16px 18px;
}

.dp-event-card__city {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #6b7280;
}

.dp-event-card__title {
	font-size: 18px;
	font-weight: 700;
	margin: 4px 0;
}

.dp-event-card__date {
	font-size: 14px;
	color: #6b7280;
}

.dp-event-card__badge {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	background: #f4f4f5;
}

.dp-event-card__badge--out {
	background: #fef2f2;
	color: #991b1b;
}

.dp-cities {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	padding: 0;
	list-style: none;
}

.dp-cities a {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid #e4e4e7;
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-size: 14px;
}

.dp-cities a.is-active {
	background: #111827;
	color: #fff;
	border-color: #111827;
}

/* --- Мобильные --- */

@media (max-width: 560px) {
	.dp-buyer {
		grid-template-columns: 1fr;
	}

	.dp-tier {
		flex-wrap: wrap;
	}

	.dp-tier__main {
		flex: 1 1 100%;
	}

	.dp-tier__price {
		flex: 1 1 auto;
	}
}

/* --- Тёмная тема сайта --- */

@media (prefers-color-scheme: dark) {
	.dp-tickets {
		--dp-bg: transparent;
		--dp-fg: inherit;
		--dp-line: rgba(128, 128, 128, 0.35);
		--dp-muted: #9ca3af;
	}
}
