/**
 * Public-facing styles for Seat Dedication Plugin
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@400;500;600;700&display=swap');

.seat-dedication-container,
.teatro-seating-container {
	max-width: 1200px;
	margin: 15px auto;
	padding: 10px;
	font-family: "Poppins", Sans-serif;
	color: #3C0400;
}

/* Header with controls - removed, zoom controls are in zoomer container */

.view-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
}

.toggle-option {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	padding: 8px 12px;
	border-radius: 4px;
	transition: background 0.2s;
}

.toggle-option:hover {
	background: #e0e0e0;
}

.toggle-option input[type="radio"] {
	margin: 0;
	cursor: pointer;
}

.toggle-option input[type="radio"]:checked + span {
	font-weight: 600;
}

.wheelchair-icon {
	width: 16px;
	height: 16px;
	vertical-align: middle;
}

.info-btn {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid #999;
	background: #fff;
	color: #999;
	cursor: pointer;
	font-size: 14px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.info-btn:hover {
	background: #999;
	color: #fff;
}

.zoom-controls {
	display: flex;
	gap: 5px;
}

.zoom-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.zoom-btn:hover {
	background: #f0f0f0;
	border-color: #999;
}

.zoom-btn.zoom-reset {
	font-size: 16px;
}

/* Seating Chart Wrapper */
.seat-dedication-chart-wrapper,
.teatro-seating-chart-wrapper {
	position: relative;
	width: 100%;
	overflow: auto;
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 8px;
}

.seat-dedication-chart,
.teatro-seating-chart {
	position: relative;
	width: 100%;
	max-width: 1000px;
	margin: 0;
	transform-origin: center center;
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Reserved Section */
.reserved-section {
	position: relative;
	width: 70%;
	height: 60px;
	background: #1e3a8a;
	border-radius: 6px;
	margin: 0 auto 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.reserved-label {
	color: #fff;
	font-weight: bold;
	font-size: 18px;
	letter-spacing: 2px;
}

/* Stage Section */
.stage-section {
	position: relative;
	width: 55%;
	margin: 0 auto 20px;
	height: 50px;
	background: #9ca3af;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}

.stage-label {
	color: #fff;
	font-weight: bold;
	font-size: 20px;
	letter-spacing: 3px;
}

/* Seating Grid Container - SVG Based */
.seating-grid-container {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.seating-zoomer {
	position: relative;
	width: 100%;
	min-height: 600px;
	overflow: auto;
	background: transparent;
	border: none;
	border-radius: 0;
}

.seating-zoomer-controls {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 10;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 5px;
	background: rgba(255, 255, 255, 0.9);
	padding: 5px;
	border-radius: 4px;
}

.seating-zoomer-content {
	width: 100%;
	height: 100%;
	position: relative;
	overflow: visible;
	transform-origin: top left;
}

.seating-svg {
	width: 100%;
	height: auto;
	max-height: 700px;
	min-height: 500px;
	display: block;
	background: #f5f5f5;
	margin: 0;
}

/* Three Main Sections */
.seating-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	position: relative;
}

.section-left {
	transform: rotate(-22deg);
	transform-origin: center bottom;
}

.section-center {
	transform: rotate(0deg);
	flex: 1;
	max-width: 50%;
}

.section-right {
	transform: rotate(22deg);
	transform-origin: center bottom;
}

/* Section Rows */
.section-row {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0;
	position: relative;
	margin-bottom: 8px; /* Vertical spacing between rows (30-40px) */
}

/* Seat Blocks - three distinct sections */
.seat-block {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
}

.seat-row-label {
	position: absolute;
	left: -35px;
	font-size: 11px;
	font-weight: 600;
	color: #333;
	width: 25px;
	text-align: right;
	line-height: 1.2;
}

/* Wheelchair Block */
.wheelchair-block {
	display: flex;
	gap: 4px;
	margin-top: 15px;
	padding: 10px;
	background: rgba(59, 130, 246, 0.1);
	border-radius: 4px;
}

/* SVG Seats */
.seat {
	cursor: pointer;
	pointer-events: all;
}

/* Regular seats - smooth hover effect */
.seat:not(.seat-accessible):not(.seat-reserved):not(.seat-booked) {
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
	transform-origin: center center;
}

.seat-accessible {
	/* Wheelchair seats should not have hover transform to prevent misalignment */
	transition: opacity 0.2s ease, filter 0.2s ease;
	transform-origin: center center;
}

.seat-available,
.seat-standard {
	fill: #E52A1B;
	stroke: #3C0400;
	stroke-width: 2;
}

.seat-premium {
	fill: #28a745;
	stroke: #1e7e34;
	stroke-width: 2;
}

.seat-platinum {
	fill: #ffc107;
	stroke: #e0a800;
	stroke-width: 2;
}

.seat-booked {
	fill: #9ca3af;
	stroke: #6b7280;
	stroke-width: 2;
	opacity: 0.6;
}

.seat.selected {
	fill: #3b82f6;
	stroke: #1e40af;
	stroke-width: 3;
	filter: drop-shadow(0 0 4px #93c5fd);
}

.seat-premium.selected {
	fill: #28a745;
	stroke: #1e7e34;
	filter: drop-shadow(0 0 4px #5cb85c);
}

.seat-platinum.selected {
	fill: #ffc107;
	stroke: #e0a800;
	filter: drop-shadow(0 0 4px #ffd54f);
}

.seat-accessible {
	fill: #9ca3af;
	stroke: #6b7280;
	stroke-width: 2;
}

.seat-accessible circle {
	fill: #9ca3af;
	stroke: #6b7280;
	stroke-width: 2;
}

.seat-accessible path {
	fill: #fff;
}

.reserved-polygon {
	display: none !important;
}

.reserved-label-text {
	display: none !important;
}

/* Hover effect only for non-accessible, non-reserved seats */
.seat:not(.seat-accessible):not(.seat-reserved):not(.seat-booked):hover {
	transform: scale(1.02);
	z-index: 10;
	filter: brightness(1.08);
}

.seat-accessible:hover {
	opacity: 0.9;
	filter: brightness(1.05);
}

.seat.seat-reserved,
.seat.seat-booked {
	cursor: not-allowed;
	opacity: 0.6;
	pointer-events: none;
}

.seat.seat-reserved:hover,
.seat.seat-booked:hover {
	transform: none;
}

.seat.available {
	background: #E52A1B;
	border-color: #3C0400;
}

.seat.selected {
	background: #3b82f6;
	border-color: #1e40af;
	box-shadow: 0 0 0 2px #93c5fd;
	transform: scale(1.2);
}

.seat.reserved,
.seat.booked {
	background: #9ca3af;
	border-color: #6b7280;
	cursor: not-allowed;
	opacity: 0.6;
}

.seat.accessible {
	background: #9ca3af;
	border-color: #6b7280;
	position: relative;
}

.seat.accessible::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 6px;
	height: 6px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12.5 2C13.33 2 14 2.67 14 3.5S13.33 5 12.5 5 11 4.33 11 3.5 11.67 2 12.5 2M10 4.5C10 3.67 10.67 3 11.5 3H13.5C14.33 3 15 3.67 15 4.5S14.33 6 13.5 6H11.5C10.67 6 10 5.33 10 4.5M20.5 8C19.67 8 19 8.67 19 9.5S19.67 11 20.5 11 22 10.33 22 9.5 21.33 8 20.5 8M18 9.5C18 8.67 18.67 8 19.5 8H21.5C22.33 8 23 8.67 23 9.5S22.33 11 21.5 11H19.5C18.67 11 18 10.33 18 9.5M12.5 7C8.91 7 6 9.91 6 13.5S8.91 20 12.5 20 19 17.09 19 13.5 16.09 7 12.5 7M12.5 18C10.01 18 8 15.99 8 13.5S10.01 9 12.5 9 17 11.01 17 13.5 14.99 18 12.5 18M12.5 10C11.12 10 10 11.12 10 12.5S11.12 15 12.5 15 15 13.88 15 12.5 13.88 10 12.5 10M12.5 13C12.22 13 12 12.78 12 12.5S12.22 12 12.5 12 13 12.22 13 12.5 12.78 13 12.5 13Z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	opacity: 1;
	z-index: 2;
}

/* Aisle spacing - clear visual separation between blocks */
.aisle {
	width: 12px;
	height: 8px;
	flex-shrink: 0;
}

.aisle-main {
	width: 18px;
	background: transparent;
}

/* Info Section - Now inside chart wrapper */
.seat-dedication-info,
.teatro-seating-info {
	margin-top: 10px;
	padding: 10px;
	background: #f9f9f9;
	border-radius: 6px;
	border-top: 1px solid #ddd;
}

.selected-seats-info h4 {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-family: "Bebas Neue", Sans-serif;
	color: #3C0400;
	letter-spacing: 1px;
}

.selected-seats-list {
	min-height: 30px;
	margin-bottom: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.seat-prices-info {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #ddd;
}

.price-display {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	align-items: center;
}

.price-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: "Poppins", Sans-serif;
}

.price-label {
	font-weight: 600;
	color: #3C0400;
}

.price-value {
	font-weight: 700;
	color: #E52A1B;
	font-size: 16px;
}

.selected-seat-badge {
	display: inline-block;
	padding: 6px 12px;
	background: #3b82f6;
	color: #fff;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
}

.legend {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	padding-top: 10px;
	border-top: 1px solid #ddd;
	margin-top: 10px;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.selected-seats-legend {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 1px solid #ddd;
}

.selected-seats-legend h5 {
	font-family: "Bebas Neue", Sans-serif;
	color: #3C0400;
	margin: 0 0 10px 0;
	font-size: 18px;
	letter-spacing: 1px;
}

.selected-seats-list-legend {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 200px;
	overflow-y: auto;
}

.selected-seats-list-legend .no-seats-message {
	font-family: "Poppins", Sans-serif;
	color: #999;
	font-size: 14px;
	font-style: italic;
	margin: 0;
}

.selected-seat-item-legend {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f9f9f9;
	border-radius: 4px;
	border-left: 3px solid #0073aa;
	font-family: "Poppins", Sans-serif;
	font-size: 13px;
}

.selected-seat-item-legend .seat-code {
	font-weight: 600;
	color: #3C0400;
}

.selected-seat-item-legend .seat-dedication {
	color: #666;
	font-size: 12px;
	font-style: italic;
}

/* Success message */
.seat-dedication-success-message {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #28a745;
	color: #fff;
	padding: 15px 20px;
	border-radius: 4px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	z-index: 10000;
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: "Poppins", Sans-serif;
	font-size: 14px;
	opacity: 0;
	transform: translateX(100%);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.seat-dedication-success-message.show {
	opacity: 1;
	transform: translateX(0);
}

.seat-dedication-success-message .success-icon {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 16px;
}

.seat-dedication-success-message .success-text {
	font-weight: 500;
}

.seat-dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.2);
}

.seat-dot.seat-premium {
	background: #28a745;
	border-color: #1e7e34;
}

.seat-dot.seat-platinum {
	background: #ffc107;
	border-color: #e0a800;
}

.seat-dot.seat-standard {
	background: #E52A1B;
	border-color: #3C0400;
}

.seat-dot.seat-selected {
	background: #3b82f6;
	box-shadow: 0 0 0 2px #93c5fd;
}

.seat-dot.seat-reserved {
	background: #9ca3af;
	opacity: 0.6;
}

.seat-dot.seat-in-cart {
	background: #0073aa;
	border-color: #005177;
}

/* Seat in cart state - still clickable but visually distinct */
.seat-in-cart circle,
[data-seat-code].seat-in-cart circle,
.seat.seat-in-cart circle,
g.seat-in-cart circle {
	fill: #0073aa !important;
	stroke: #005177 !important;
	stroke-width: 2 !important;
	fill-opacity: 0.9;
}

.seat-in-cart,
[data-seat-code].seat-in-cart,
.seat.seat-in-cart,
g.seat-in-cart {
	cursor: pointer;
	pointer-events: all;
	filter: drop-shadow(0 0 4px rgba(0, 115, 170, 0.6));
}

.seat-in-cart:hover circle,
[data-seat-code].seat-in-cart:hover circle,
.seat.seat-in-cart:hover circle,
g.seat-in-cart:hover circle {
	fill-opacity: 1;
	filter: brightness(1.15) drop-shadow(0 0 6px rgba(0, 115, 170, 0.8));
}

/* Responsive Design */
@media (max-width: 768px) {
	.seat-dedication-container,
	.teatro-seating-container {
		padding: 10px;
		max-width: 100%;
	}
	
	.seat-dedication-chart-wrapper,
	.teatro-seating-chart-wrapper {
		padding: 20px 10px;
		min-height: 500px;
	}
	
	.seating-svg {
		max-height: 600px;
		min-height: 400px;
	}
	
	.seat {
		width: 10px;
		height: 10px;
	}
	
	.seat-row-label {
		left: -35px;
		font-size: 11px;
	}
	
	.seating-grid {
		padding-left: 40px;
	}
	
	.stage-section {
		width: 80%;
		height: 50px;
	}
	
	.stage-label {
		font-size: 16px;
	}
	
	.reserved-section {
		height: 60px;
	}
	
	.reserved-label {
		font-size: 14px;
	}
	
	.legend {
		flex-direction: column;
		gap: 10px;
	}
}

@media (max-width: 480px) {
	.seating-svg {
		max-height: 500px;
		min-height: 350px;
	}
	
	.seat {
		width: 8px;
		height: 8px;
	}
	
	.seat-row {
		gap: 4px;
	}
	
	.aisle {
		width: 15px;
	}
	
	.seat-row-label {
		left: -20px;
		font-size: 9px;
	}
}

/* Zoom functionality */
.teatro-seating-chart.zoom-50 {
	transform: scale(0.5);
}

.teatro-seating-chart.zoom-75 {
	transform: scale(0.75);
}

.teatro-seating-chart.zoom-100 {
	transform: scale(1);
}

.teatro-seating-chart.zoom-125 {
	transform: scale(1.25);
}

.teatro-seating-chart.zoom-150 {
	transform: scale(1.5);
}

/* Seat Dedication Popup */
.seat-dedication-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.seat-dedication-popup-content {
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	max-width: 400px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
}

.seat-dedication-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: #E52A1B;
	border: 2px solid #3C0400;
	border-radius: 50%;
	font-size: 24px;
	cursor: pointer;
	color: #fff;
	line-height: 1;
	padding: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	z-index: 10001;
}

.seat-dedication-popup-close:hover {
	background: #3C0400;
	border-color: #E52A1B;
	color: #fff;
	transform: scale(1.1);
}

.seat-dedication-popup h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-family: "Bebas Neue", Sans-serif;
	color: #3C0400;
	font-size: 28px;
	letter-spacing: 1px;
}

.seat-dedication-popup-info {
	margin-bottom: 20px;
	padding: 15px;
	background: #f5f5f5;
	border-radius: 4px;
}

.seat-dedication-popup-info p {
	margin: 8px 0;
}

.form-group {
	margin-bottom: 15px;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.form-group .required {
	color: #d63638;
}

.form-group input[type="text"] {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: "Poppins", Sans-serif;
}

.annotation-preview-group {
	margin: 15px 0;
}

.annotation-preview-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #3C0400;
	font-family: "Bebas Neue", Sans-serif;
	font-size: 18px;
	letter-spacing: 1px;
}

.annotation-preview-box {
	margin: 0;
	padding: 20px;
	background: #3C0400;
	border: 2px solid #E52A1B;
	border-radius: 4px;
	min-height: 80px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.annotation-preview-line {
	color: #fff;
	font-family: "Bebas Neue", Sans-serif;
	font-size: 24px;
	letter-spacing: 2px;
	text-align: center;
	min-height: 28px;
	line-height: 28px;
	margin: 4px 0;
}

.annotation-preview-line:empty::before {
	content: '\00a0';
}

.char-count {
	display: block;
	text-align: right;
	font-size: 12px;
	color: #666;
	margin-top: 4px;
}

.form-group label input[type="checkbox"] {
	margin-right: 8px;
}

.form-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.form-actions .button {
	flex: 1;
	padding: 12px;
	font-size: 16px;
	cursor: pointer;
	border: none;
	border-radius: 4px;
	transition: all 0.2s;
}

.button-primary {
	background: #E52A1B;
	color: #fff;
}

.button-primary:hover {
	background: #3C0400;
}

.button {
	background: #f0f0f1;
	color: #2c3338;
}

.button:hover {
	background: #dcdcde;
}

.seat-dedication-error {
	background: #fcf0f1;
	border: 1px solid #d63638;
	color: #d63638;
	padding: 10px;
	border-radius: 4px;
	margin-top: 15px;
}

