/* Almanart look and layout for the MEC Seat picker. Loaded after mec-seat's own styles. */

body {
	--aa-orange: #f15c2c; /* the app's accent */
	--aa-orange-dark: #d94b1e;
	--aa-orange-soft: #fdeee9;
	--aa-seat-border: #c9cfd4;
	--aa-taken: #d9dde1;
	--aa-text: #2b2b2b;
	--aa-muted: #6f777c;
	--aa-map-bg: #f7f7f8;
}

/* ================= Booking form: the "choose seats" card (app-style row) ================= */

.mec-seat-select-wrap {
	display: flex !important;
	flex-direction: column;
	gap: 14px;
	margin: 0 0 12px !important;
	padding: 14px 16px 16px !important;
	border: 0 !important;
	border-radius: 22px;
	background: #f6f6f8;
}

.mec-seat-select-wrap .aa-seat-info {
	display: flex;
	align-items: center;
	gap: 14px;
}

.mec-seat-select-wrap .aa-tile-seat::before {
	content: "";
	width: 20px;
	height: 20px;
	background: var(--aa-orange);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10a2 2 0 0 1 2 2v6H5V5a2 2 0 0 1 2-2Zm-4 9h18a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v4h-2v-4H6v4H4v-4H3a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10a2 2 0 0 1 2 2v6H5V5a2 2 0 0 1 2-2Zm-4 9h18a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v4h-2v-4H6v4H4v-4H3a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mec-seat-select-wrap.aa-has-seats .aa-row-value {
	color: var(--aa-orange) !important;
}

/* Soft orange button, like "Shto në kalendar" in the app. */
.mec-seat-select-wrap #mec-seat-open-seats {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 48px;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 0 !important;
	border-radius: 16px !important;
	background: var(--aa-orange) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-transform: none !important;
	cursor: pointer;
	transition: background .15s, transform .08s;
}

.mec-seat-select-wrap.aa-has-seats #mec-seat-open-seats {
	background: rgba(241, 92, 44, .10) !important;
	color: var(--aa-orange) !important;
}

.mec-seat-select-wrap #mec-seat-open-seats:hover {
	background: var(--aa-orange-dark) !important;
}

.mec-seat-select-wrap.aa-has-seats #mec-seat-open-seats:hover {
	background: rgba(241, 92, 44, .16) !important;
}

.mec-seat-select-wrap #mec-seat-open-seats:active {
	transform: scale(.98);
}

.mec-seat-select-wrap #mec-seat-open-seats svg,
.mec-seat-select-wrap #mec-seat-open-seats img {
	display: none !important;
}

/* Vazhdo pressed without seats: ring the card and say so (seat-ui.js showSeatMissing). */
.mec-seat-select-wrap.aa-seat-missing {
	box-shadow: 0 0 0 2px var(--aa-orange);
}

/* aa-shake above is for the centred picker bar (translateX(-50%)); the card shakes in place. */
@keyframes aa-shake-in-place {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	75% { transform: translateX(6px); }
}

.mec-seat-select-wrap.aa-shake {
	animation: aa-shake-in-place .3s 2;
}

.mec-seat-select-wrap .aa-seat-error {
	margin: -4px 4px 0 !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #cb2916 !important;
}

/* The chosen seats are shown in the row above. */
.mec-seat-select-wrap .mec-seat-event-selected-seats {
	display: none !important;
}

/* ================= Picker: full screen on every device ================= */

.mec-seat-seats-settings-lity-wrap .lity-wrap {
	padding: 0 !important;
}

.mec-seat-seats-settings-lity-wrap .lity-container {
	width: 100% !important;
	max-width: 100% !important;
	height: 100%;
	max-height: 100%;
	padding: 0 !important;
}

.mec-seat-seats-settings-lity-wrap .lity-content {
	width: 100% !important;
	height: 100vh;
	height: 100dvh;
	max-height: none !important;
	border-radius: 0 !important;
	overflow: hidden !important;
	background: #fff;
}

.mec-seat-seats-settings-lity-wrap .lity-close {
	display: none;
}

.mec-seat-seats-settings-lity-wrap #mec-seat-layouts-wrap {
	display: flex !important;
	flex-direction: column;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	overflow: hidden !important;
	padding: 0 !important;
	margin: 0 !important;
}

.mec-seat-seats-settings-lity-wrap .mec-seat-topbar {
	flex: 0 0 auto;
	padding: 10px 16px !important;
	width: 100% !important;
	box-sizing: border-box;
	border-bottom: 1px solid #eee;
}

.mec-seat-seats-settings-lity-wrap .mec-seat-back-lity {
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.mec-seat-seats-settings-lity-wrap .mec-seats-wrap {
	flex: 1 1 auto;
	min-height: 0;
	display: flex !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.mec-seat-seats-settings-lity-wrap .mec-seats-content-wrap {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	position: relative;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
	border: 0 !important;
	background: var(--aa-map-bg);
}

/* The map: only this box scrolls; seats are sized with --aa-zoom (set by seat-ui.js). */
.mec-seat-seats-settings-lity-wrap .mec-seat-layouts-wrap .mec-seat-mobile-map {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	overflow: auto !important;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-x pan-y;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent;
}

.mec-seat-seats-settings-lity-wrap .mec-seat-layouts-wrap .mec-seat-mobile-map .mec-seat-layout {
	transform: none !important;
	zoom: var(--aa-zoom, 1);
	width: max-content !important;
	margin: 0 auto !important;
	padding: 0 24px 24px !important;
	box-sizing: content-box;
}

/* Room for the instruction bar, outside the zoomed content so it does not shrink with it. */
.mec-seat-seats-settings-lity-wrap .mec-seat-layouts-wrap .mec-seat-mobile-map::before {
	content: "";
	display: block;
	height: 84px;
	flex: 0 0 84px; /* the map is a flex column; without this the spacer shrinks to 0 */
}

.mec-seat-seats-settings-lity-wrap .mec-seat-layouts-wrap .seat-selection,
.mec-seat-seats-settings-lity-wrap .mec-seat-layouts-wrap .seat-selection .seat-area {
	transform: none !important;
	overflow: visible !important;
}

/* The legend now lives in the instruction bar. */
.mec-seat-seats-settings-lity-wrap .mes-seats-footer {
	display: none !important;
}

/* ================= Seats ================= */

.mec-seat-layouts-wrap .seat-selection li.mec-seat:not(.mec-seat-empty) {
	border: 2px solid var(--aa-seat-border);
	border-radius: 7px 7px 3px 3px;
	background: #fff;
	transition: background-color .12s, border-color .12s;
}

.mec-seat-layouts-wrap .seat-selection li.mec-seat.can-select {
	cursor: pointer;
}

@media (hover: hover) {
	.mec-seat-layouts-wrap .seat-selection li.mec-seat.can-select:not(.current-selected):hover {
		border-color: var(--aa-orange) !important;
		background: var(--aa-orange-soft) !important;
	}
}

.mec-seat-layouts-wrap li.mec-seat.current-selected,
.mec-seat-layouts-wrap li.mec-seat.mec-seat-selected {
	background: var(--aa-orange) !important;
	border-color: var(--aa-orange) !important;
}

.mec-seat-layouts-wrap li.mec-seat.mec-seat-booked {
	background: var(--aa-taken) !important;
	border-color: var(--aa-taken) !important;
	cursor: not-allowed;
}

.mec-seat-layouts-wrap li.mec-seat span {
	background: transparent !important;
}

/* Rows size to their seats (mec-seat fixes the area at 800px, which wraps the right-hand letter). */
.mec-seat-layouts-wrap .seat-selection .seat-area {
	width: max-content !important;
	margin: 0;
}

.mec-seat-layouts-wrap .seat-selection .mec-areas-row {
	justify-content: safe center !important;
}

.mec-seat-layouts-wrap .seat-selection ul.seat-area-row {
	white-space: nowrap;
	width: max-content !important;
	margin-left: auto;
	margin-right: auto;
}

/* Seats of a row sit in a nested list that mec-seat makes a full-width block; keep it inline with the letters. */
.mec-seat-layouts-wrap .seat-selection ul.seat-area-row > ul {
	display: inline-block !important;
	width: auto !important;
	vertical-align: middle;
	white-space: nowrap;
	margin: 0 !important;
	padding: 0 !important;
}

/* Row letters on both sides. mec-seat places the left one absolutely 44px outside the row, where it is clipped. */
.mec-seat-layouts-wrap .seat-selection ul.seat-area-row > .row-indicator,
.mec-seat-layouts-wrap .seat-selection ul.seat-area-row > .aa-row-end {
	display: inline-block !important;
	position: static !important;
	left: auto !important;
	vertical-align: middle;
	font-weight: 700;
	color: var(--aa-text);
	font-size: 12px;
	min-width: 24px;
	text-align: center;
	list-style: none;
	background: transparent;
	border: 0;
}

/* In the picker, keep the row letters pinned to the map edges while scrolling sideways. */
.mec-seat-seats-settings-lity-wrap .mec-seat-layouts-wrap .seat-selection ul.seat-area-row > .row-indicator {
	position: sticky !important;
	left: 0 !important;
	z-index: 3;
	background: rgba(247, 247, 248, .95) !important;
	border-radius: 0 6px 6px 0;
}

.mec-seat-seats-settings-lity-wrap .mec-seat-layouts-wrap .seat-selection ul.seat-area-row > .aa-row-end {
	position: sticky !important;
	right: 0 !important;
	z-index: 3;
	background: rgba(247, 247, 248, .95) !important;
	border-radius: 6px 0 0 6px;
}

/* Walkway between rows (e.g. between G and F). */
.mec-seat-layouts-wrap .seat-selection .seat-area-row.aisle-row {
	height: 22px !important;
	min-height: 22px !important;
}

/* A single seating area does not need its own title above the seats. */
.mec-seat-layouts-wrap .mec-areas-row > .mec-seat-area:only-child > .seat-area-desc {
	display: none;
}

/* ================= Stage ================= */

.mec-seat-layouts-wrap .seat-selection .movie-screen {
	background: linear-gradient(180deg, var(--aa-orange-soft), #fff) !important;
	border-top: 4px solid var(--aa-orange);
	border-radius: 0 0 50% 50% / 0 0 22px 22px;
	color: var(--aa-orange) !important;
	font-weight: 700;
	letter-spacing: .4em;
	font-size: 14px;
	line-height: 38px;
	height: 38px;
	width: 70% !important;
	max-width: 520px;
	margin: 0 auto 22px !important;
	align-self: center !important;
}

.aa-stage-bottom .mec-seat-layouts-wrap .seat-selection .mec-seat-inner {
	display: flex;
	flex-direction: column;
}

.aa-stage-bottom .mec-seat-layouts-wrap .seat-selection .movie-screen {
	order: 99;
	margin: 22px auto 0 !important;
	border-top: 0;
	border-bottom: 4px solid var(--aa-orange);
	border-radius: 50% 50% 0 0 / 22px 22px 0 0;
	background: linear-gradient(0deg, var(--aa-orange-soft), #fff) !important;
}

/* ================= Instruction bar (added by seat-ui.js) ================= */

.aa-pick-bar {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 6;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: max-content;
	max-width: calc(100% - 24px);
	box-sizing: border-box;
	padding: 8px 16px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
	text-align: center;
	pointer-events: none;
}

.aa-pick-bar .aa-pick-text {
	font-size: 14px;
	font-weight: 600;
	color: var(--aa-text);
}

.aa-pick-bar .aa-pick-count {
	color: var(--aa-orange);
	font-weight: 700;
	white-space: nowrap;
}

.aa-pick-bar.aa-done .aa-pick-text {
	color: #1f8a4c;
}

.aa-pick-bar .aa-legend {
	display: flex;
	gap: 12px;
	font-size: 12px;
	color: var(--aa-muted);
}

.aa-pick-bar .aa-legend span {
	white-space: nowrap;
}

.aa-pick-bar .aa-legend i {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 4px 4px 2px 2px;
	border: 2px solid var(--aa-seat-border);
	background: #fff;
	vertical-align: -2px;
	margin-right: 4px;
}

.aa-pick-bar .aa-legend i.aa-taken {
	background: var(--aa-taken);
	border-color: var(--aa-taken);
}

.aa-pick-bar .aa-legend i.aa-mine {
	background: var(--aa-orange);
	border-color: var(--aa-orange);
}

@keyframes aa-shake {
	0%, 100% { transform: translateX(-50%); }
	25% { transform: translateX(calc(-50% - 6px)); }
	75% { transform: translateX(calc(-50% + 6px)); }
}

.aa-pick-bar.aa-shake {
	animation: aa-shake .3s 2;
}

/* ================= Zoom controls ================= */

.mec-seat-seats-settings-lity-wrap .mec-seat-zoom-controls {
	display: flex !important;
	flex-direction: column;
	gap: 8px;
	position: absolute !important;
	right: 14px !important;
	left: auto !important;
	top: auto !important;
	bottom: 16px !important;
	z-index: 6 !important;
}

.mec-seat-seats-settings-lity-wrap .mec-seat-zoom-btn,
.mec-seat-seats-settings-lity-wrap .aa-fit-btn {
	width: 44px !important;
	height: 44px !important;
	line-height: 44px !important;
	font-size: 22px !important;
	text-align: center;
	border-radius: 12px !important;
	background: #fff !important;
	color: var(--aa-text) !important;
	border: 0 !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	cursor: pointer;
	user-select: none;
	padding: 0 !important;
	margin: 0 !important;
}

.mec-seat-seats-settings-lity-wrap .aa-fit-btn {
	font-size: 18px !important;
}

/* ================= Selection panel ================= */

.mec-seat-seats-settings-lity-wrap #mec-seat-save-seats {
	background: var(--aa-orange) !important;
	border-color: var(--aa-orange) !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 16px;
	border-radius: 10px;
	min-height: 48px;
}

.mec-seat-seats-settings-lity-wrap #mec-seat-save-seats:hover {
	background: var(--aa-orange-dark) !important;
}

.mec-seat-seats-settings-lity-wrap #mec-seat-save-seats.aa-not-ready {
	opacity: .45;
}

.mec-seat-layouts-wrap .mec-seat-event-selected-seats .seats {
	font-weight: 700;
	color: var(--aa-orange) !important;
}

/* Desktop: panel on the right. */
@media (min-width: 769px) {
	.mec-seat-seats-settings-lity-wrap .mec-seats-wrap {
		flex-direction: row;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap {
		flex: 0 0 320px;
		width: 320px !important;
		max-width: 320px !important;
		height: auto !important;
		margin: 0 !important;
		padding: 20px !important;
		box-sizing: border-box;
		border-left: 1px solid #eee;
		display: flex !important;
		flex-direction: column;
		overflow-y: auto;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap .mec-seat-total {
		margin-top: auto !important;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile {
		display: none !important;
	}
}

/* Phones: bottom bar with chosen seats, total and Konfirmo. */
@media (max-width: 768px) {
	.mec-seat-seats-settings-lity-wrap .mec-seats-wrap {
		flex-direction: column;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap {
		display: none !important;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile {
		flex: 0 0 auto;
		display: grid !important;
		grid-template-columns: 1fr auto;
		align-items: center;
		gap: 6px 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom)) !important;
		margin: 0 !important;
		width: 100% !important;
		box-sizing: border-box;
		background: #fff;
		box-shadow: 0 -4px 14px rgba(0, 0, 0, .08);
		position: relative;
		z-index: 7;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile > * {
		margin: 0 !important;
		padding: 0 !important;
		width: auto !important;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile .mec-mobile-title,
	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile .mec-seat-event-detail:not(.mec-seat-event-selected-seats) {
		display: none !important;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile .mec-mobile-info {
		grid-column: 1;
		min-width: 0;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile .mec-seat-event-selected-seats {
		font-size: 13px;
		line-height: 1.35;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile .mec-seat-total {
		grid-column: 1 / -1;
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile .mec-seat-price {
		font-weight: 700;
		white-space: nowrap;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile .mec-seat-price .price {
		margin-left: 4px;
	}

	.mec-seat-seats-settings-lity-wrap .mec-seats-sidebar-wrap-mobile #mec-seat-save-seats {
		flex: 1 1 auto;
		max-width: 60%;
		margin: 0 !important;
	}

	.aa-pick-bar .aa-pick-text {
		font-size: 13px;
	}
}
