/*
 * Defensive reset: this plugin's markup can end up on any theme (the site
 * has already switched themes once), so we scope a hard reset under our own
 * wrapper classes and !important a handful of properties that page builders
 * and theme reset stylesheets (e.g. Hello Elementor's reset.css) commonly
 * clobber — button/input chrome, box-sizing, and link underlines. Everything
 * else below still cascades normally.
 */
.mpt-tm-app,
.mpt-tm-app *,
.mpt-ticket-form-wrap,
.mpt-ticket-form-wrap * {
	box-sizing: border-box !important;
}

.mpt-tm-app a,
.mpt-ticket-form-wrap a {
	text-decoration: none !important;
}

.mpt-tm-app button,
.mpt-ticket-form-wrap button,
.mpt-tm-app input,
.mpt-ticket-form-wrap input,
.mpt-tm-app select,
.mpt-ticket-form-wrap select {
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	line-height: normal;
}

.mpt-tm-app,
.mpt-ticket-form-wrap {
	--mpt-red: #b81a28;
	--mpt-red-dark: #931420;
	--mpt-dark: #1a1a1a;
	--mpt-gold: #d4a017;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Event grid ---------- */
.mpt-tm-grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin: 0 auto;
	list-style: none !important;
	padding: 0 !important;
}

@media (max-width: 1100px) {
	.mpt-tm-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.mpt-tm-grid {
		grid-template-columns: 1fr;
	}
}

.mpt-tm-card {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	display: flex;
	flex-direction: column;
}

.mpt-tm-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.mpt-tm-card-media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--mpt-red) 0%, var(--mpt-dark) 100%);
	overflow: hidden;
}

.mpt-tm-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mpt-tm-card-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mpt-tm-card-placeholder-logo {
	width: 55%;
	max-width: 180px;
	filter: brightness(0) invert(1);
	opacity: 0.9;
}

.mpt-tm-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: var(--mpt-dark);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 999px;
}

.mpt-tm-card-body {
	padding: 18px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.mpt-tm-card-title {
	margin: 0 !important;
	font-size: 18px !important;
	font-weight: 800 !important;
	color: var(--mpt-dark) !important;
	line-height: 1.3 !important;
}

.mpt-tm-card-meta {
	margin: 0 !important;
	font-size: 13px !important;
	color: #777 !important;
}

.mpt-tm-card-footer {
	margin-top: auto;
	padding-top: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.mpt-tm-card-price {
	font-weight: 800 !important;
	font-size: 16px !important;
	color: var(--mpt-red) !important;
}

.mpt-tm-card-btn {
	display: inline-block !important;
	padding: 9px 16px !important;
	border-radius: 999px !important;
	background: var(--mpt-red) !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 13px !important;
	border: none !important;
	cursor: pointer;
	transition: background 0.15s ease;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

.mpt-tm-card-btn:hover {
	background: var(--mpt-red-dark) !important;
	color: #fff !important;
}

.mpt-tm-card-btn-disabled {
	background: #e2e2e2;
	color: #888;
}

.mpt-tm-card-sold-out {
	opacity: 0.75;
}

.mpt-tm-empty {
	text-align: center;
	color: #888;
	padding: 40px 0;
}

/* ---------- Stage (form view) ---------- */
.mpt-tm-stage {
	width: 100%;
}

.mpt-tm-forms {
	display: flex;
	justify-content: center;
	width: 100%;
}

.mpt-tm-back {
	background: none;
	border: none;
	color: var(--mpt-red);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	padding: 0 0 20px;
	display: inline-block;
}

.mpt-tm-back:hover {
	text-decoration: underline;
}

.mpt-single-event-form {
	max-width: 1040px;
	margin: 32px auto 0;
	padding: 0 20px;
}

/* ---------- Purchase form ---------- */
.mpt-ticket-form-wrap {
	width: 100%;
	max-width: 1040px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 14px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

/* Two-column checkout: poster + description on one side, the purchase
   form on the other. Collapses to a single stacked column on narrow
   screens (see the max-width: 780px query below). */
.mpt-checkout-grid {
	display: grid !important;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: stretch;
}

.mpt-checkout-media {
	padding: 28px;
	background: #faf9f8;
	border-right: 1px solid #eee;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.mpt-checkout-poster-img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 12px;
	display: block;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.mpt-checkout-poster-placeholder {
	width: 100%;
	aspect-ratio: 3 / 4;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--mpt-red) 0%, var(--mpt-dark) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.mpt-checkout-poster-placeholder-logo {
	width: 50%;
	max-width: 160px;
	filter: brightness(0) invert(1);
	opacity: 0.9;
}

.mpt-event-description {
	color: #555;
	font-size: 14px;
	line-height: 1.65;
}

.mpt-event-description p {
	margin: 0 0 10px;
}

.mpt-event-description p:last-child {
	margin-bottom: 0;
}

.mpt-checkout-panel {
	padding: 28px;
	min-width: 0;
}

@media (max-width: 780px) {
	.mpt-checkout-grid {
		grid-template-columns: 1fr;
	}

	.mpt-checkout-media {
		border-right: none;
		border-bottom: 1px solid #eee;
	}

	.mpt-checkout-poster-img,
	.mpt-checkout-poster-placeholder {
		aspect-ratio: 16 / 9;
		max-width: 420px;
		margin: 0 auto;
	}
}

@media (max-width: 480px) {
	.mpt-checkout-media,
	.mpt-checkout-panel {
		padding: 20px;
	}
}

.mpt-form-logo {
	text-align: center;
	margin-bottom: 18px;
}

.mpt-form-logo img {
	max-width: 160px;
	max-height: 60px;
	width: auto;
	height: auto;
	display: inline-block;
}

.mpt-event-summary {
	text-align: center;
	margin-bottom: 22px;
	padding-bottom: 18px;
	border-bottom: 1px dashed #ddd;
}

.mpt-event-title {
	margin: 0 0 6px !important;
	font-size: 22px !important;
	font-weight: 800 !important;
	letter-spacing: 0.01em;
	color: var(--mpt-dark) !important;
}

.mpt-event-meta {
	margin: 0 0 10px !important;
	color: #666 !important;
	font-size: 14px !important;
}

.mpt-event-price {
	margin: 0 !important;
	font-size: 26px !important;
	font-weight: 800 !important;
	color: var(--mpt-red) !important;
}

.mpt-field {
	margin-bottom: 16px;
}

.mpt-field label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
	color: #222;
}

.mpt-field input,
.mpt-field select {
	width: 100% !important;
	padding: 11px 12px !important;
	border: 1px solid #ccc !important;
	border-radius: 8px !important;
	font-size: 15px !important;
	background: #fff !important;
	color: #222 !important;
	box-shadow: none !important;
	margin: 0 !important;
	max-width: none !important;
}

.mpt-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23888'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	padding-right: 34px !important;
}

.mpt-field input:focus,
.mpt-field select:focus {
	outline: none;
	border-color: var(--mpt-red);
	box-shadow: 0 0 0 3px rgba(184, 26, 40, 0.12);
}

.mpt-field select option:disabled {
	color: #aaa;
}

.mpt-field small {
	display: block;
	margin-top: 5px;
	color: #888;
	font-size: 12px;
}

.mpt-submit-btn {
	width: 100% !important;
	padding: 14px !important;
	background: var(--mpt-red) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 8px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	cursor: pointer;
	transition: background 0.15s ease;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

.mpt-submit-btn:hover {
	background: var(--mpt-red-dark) !important;
	color: #fff !important;
}

.mpt-submit-btn:disabled {
	background: #e3aeb2;
	cursor: not-allowed;
}

.mpt-status {
	margin-top: 14px;
	text-align: center;
	font-size: 14px;
	color: #555;
	min-height: 20px;
}

.mpt-status.mpt-error {
	color: #c0392b;
	font-weight: 600;
}

.mpt-sold-out {
	text-align: center;
	color: #c0392b;
	font-weight: 700;
	padding: 20px 0;
}

.mpt-success,
.mpt-thankyou-panel {
	text-align: center;
	padding: 10px 0 4px;
}

.mpt-success-icon {
	width: 56px;
	height: 56px;
	line-height: 56px;
	border-radius: 50%;
	background: var(--mpt-red);
	color: #fff;
	font-size: 28px;
	margin: 0 auto 14px;
}

.mpt-success h4,
.mpt-thankyou-panel h2 {
	margin: 0 0 8px;
	font-size: 20px;
	color: var(--mpt-dark);
}

.mpt-success-actions {
	margin-top: 16px;
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.mpt-print-btn,
.mpt-download-btn {
	display: inline-block !important;
	padding: 11px 20px !important;
	border-radius: 8px !important;
	text-decoration: none !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	box-shadow: none !important;
}

.mpt-print-btn {
	background: var(--mpt-red) !important;
	color: #fff !important;
}

.mpt-download-btn {
	background: #f0f0f0 !important;
	color: #222 !important;
}

.mpt-thankyou-panel {
	max-width: 460px;
	margin: 0 auto 30px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 14px;
	padding: 28px;
}


/* Quantity - and + buttons (phones do not show native number arrows) */
.mpt-qty{display:flex;align-items:stretch}
.mpt-qty .mpt-qty-btn{flex:none !important;width:46px !important;min-height:44px;margin:0 !important;padding:0 !important;border:1px solid #ccc !important;background:#f5f5f5 !important;color:#222 !important;font-size:22px !important;font-weight:600 !important;line-height:1 !important;cursor:pointer;box-shadow:none !important;-webkit-appearance:none;appearance:none;touch-action:manipulation}
.mpt-qty .mpt-qty-minus{border-radius:8px 0 0 8px !important}
.mpt-qty .mpt-qty-plus{border-radius:0 8px 8px 0 !important}
.mpt-qty .mpt-qty-btn:active{background:#e6e6e6 !important}
.mpt-qty .mpt-qty-btn:disabled{opacity:.4;cursor:not-allowed}
.mpt-field .mpt-qty input.mpt-quantity{flex:1;width:auto !important;min-width:0;text-align:center;border-radius:0 !important;border-left:0 !important;border-right:0 !important;-moz-appearance:textfield}
.mpt-qty input.mpt-quantity::-webkit-outer-spin-button,.mpt-qty input.mpt-quantity::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* One download row per ticket */
.mpt-ticket-links{display:flex;flex-direction:column;gap:10px;margin-top:16px;text-align:left}
.mpt-ticket-link-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #eee;border-radius:10px;background:#fafafa}
.mpt-ticket-link-info{display:flex;flex-direction:column;gap:2px;min-width:0}
.mpt-ticket-link-info span{font-size:12px;color:#777;word-break:break-all}
.mpt-ticket-link-row .mpt-print-btn{flex:none}


/* Several ticket types per order: one row per type */
.mpt-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #222; }
.mpt-ticket-list { display: flex; flex-direction: column; gap: 10px; }
.mpt-ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #e2e2e2; border-radius: 10px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.mpt-ticket-row.is-picked { border-color: var(--mpt-red, #b81a28); box-shadow: 0 0 0 1px var(--mpt-red, #b81a28); }
.mpt-ticket-row.is-sold-out { opacity: .55; }
.mpt-ticket-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mpt-ticket-row-info strong { font-size: 15px; line-height: 1.3; color: var(--mpt-dark, #1a1a1a); }
.mpt-ticket-row-info span { font-size: 13px; color: #666; }
.mpt-ticket-row .mpt-qty { flex: none; width: 138px; }

/* Coupon */
.mpt-coupon-row { display: flex; gap: 8px; }
.mpt-field .mpt-coupon-row .mpt-coupon-input { flex: 1; width: auto !important; min-width: 0; text-transform: uppercase; }
.mpt-coupon-apply { flex: none; min-height: 44px; padding: 0 18px !important; margin: 0 !important; border: 1px solid var(--mpt-dark, #1a1a1a) !important; background: var(--mpt-dark, #1a1a1a) !important; color: #fff !important; border-radius: 8px !important; font-weight: 700 !important; font-size: 14px !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; }
.mpt-coupon-apply:disabled { opacity: .6; cursor: wait; }
.mpt-coupon-msg.mpt-ok { color: #047857; font-weight: 600; }
.mpt-coupon-msg.mpt-error { color: #b91c1c; font-weight: 600; }
.mpt-original-price { color: #999 !important; font-size: .6em; font-weight: 600; margin-right: 6px; }
.mpt-submit-btn:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 380px) { .mpt-ticket-row { flex-wrap: wrap; } .mpt-ticket-row .mpt-qty { width: 100%; } }

/* Send tickets to WhatsApp */
.mpt-wa-btn { display: flex !important; align-items: center; justify-content: center; margin-top: 14px; padding: 13px 18px !important; border-radius: 999px !important; background: #25D366 !important; color: #fff !important; font-weight: 700 !important; font-size: 15px !important; text-decoration: none !important; border: none !important; }
.mpt-wa-btn:hover { background: #1ebe5b !important; color: #fff !important; }

/* Past events section */
.mpt-tm-section-title { margin: 56px 0 20px !important; font-size: 26px !important; font-weight: 800 !important; text-align: center; color: var(--mpt-dark, #1a1a1a); }
.mpt-tm-card-past .mpt-tm-card-img { filter: grayscale(0.6); }
.mpt-tm-more { display: none !important; }
.mpt-tm-show-more { display: block; margin: 28px auto 0; padding: 12px 26px !important; border-radius: 999px !important; border: 1px solid var(--mpt-dark, #1a1a1a) !important; background: #fff !important; color: var(--mpt-dark, #1a1a1a) !important; font-weight: 700 !important; font-size: 15px !important; cursor: pointer; }
.mpt-tm-show-more:hover { background: var(--mpt-dark, #1a1a1a) !important; color: #fff !important; }
