/**
 * MyListing Event Tickets - Admin Styles
 *
 * @package MyListing_Event_Tickets
 * @since 1.0.0
 */

/* Admin Settings Page */
.mlet-admin-header {
	background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
	color: white;
	padding: 20px;
	margin: 0 -20px 20px 0;
	border-radius: 8px;
}

.mlet-admin-header h1 {
	color: white;
	margin: 0;
}

/* Listing Type Editor */
.field-type-event-tickets {
	border-left: 4px solid #2196F3;
}

/* Product Edit Page - Ticket Meta */
.mlet-ticket-meta {
	background: #f9f9f9;
	padding: 15px;
	border-radius: 5px;
	margin: 15px 0;
}

.mlet-ticket-meta h4 {
	margin-top: 0;
	color: #2196F3;
}

/* Admin Notices */
.notice.mlet-notice {
	border-left-color: #2196F3;
}

.notice.mlet-notice .dashicons {
	color: #2196F3;
}

/* Statistics Dashboard Widget */
.mlet-stats-widget {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-top: 15px;
}

.mlet-stat-box {
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	padding: 20px;
	border-radius: 8px;
	text-align: center;
}

.mlet-stat-box .stat-number {
	font-size: 32px;
	font-weight: 700;
	color: #2196F3;
	display: block;
	margin-bottom: 5px;
}

.mlet-stat-box .stat-label {
	font-size: 14px;
	color: #666;
}

/* Loading Spinner */
.mlet-loading-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #2196F3;
	border-radius: 50%;
	animation: mlet-spin 1s linear infinite;
}

@keyframes mlet-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ========================================
   CUSTOM FORMS STYLES
   ======================================== */

/* Custom Form Section */
.mlet-custom-form-section {
	background: linear-gradient(135deg, #fff9e6 0%, #fffaed 100%);
	border: 2px solid #FFC107;
	border-radius: 12px;
	padding: 25px;
	margin-top: 25px;
}

.mlet-custom-form-header h3 {
	margin: 0 0 10px 0;
	color: #F57C00;
	font-size: 18px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}

.mlet-custom-form-header .description {
	margin: 0;
	color: #666;
	font-size: 13px;
	font-style: italic;
}

.mlet-form-status-section {
	margin: 20px 0;
}

.mlet-form-status-select {
	width: 100%;
	padding: 10px;
	border: 2px solid #FFC107;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	background: white;
}

/* Form Fields Container */
.mlet-form-fields-container {
	display: none;
	margin-top: 20px;
	padding: 20px;
	background: white;
	border-radius: 8px;
	border: 2px dashed #2196F3;
}

.mlet-form-fields-container.active {
	display: block;
}

.mlet-base-fields-notice {
	background: #e3f2fd;
	padding: 12px;
	margin: 0 0 20px 0;
	border-left: 4px solid #2196F3;
	border-radius: 4px;
}

/* Custom Field Item */
.mlet-custom-field-item {
	background: #f5f5f5;
	border: 2px solid #ddd;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 15px;
	transition: all 0.3s ease;
}

.mlet-custom-field-item:hover {
	border-color: #2196F3;
	box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

/* Custom Field Header */
.mlet-custom-field-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	padding-bottom: 12px;
	border-bottom: 2px solid #e0e0e0;
}

.mlet-custom-field-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 700;
	color: #333;
}

.mlet-custom-field-title i {
	color: #2196F3;
	font-size: 20px;
}

.mlet-remove-custom-field-btn {
	background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
	color: white;
	border: none;
	padding: 8px 15px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: all 0.3s ease;
}

.mlet-remove-custom-field-btn:hover {
	background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

.mlet-remove-custom-field-btn i {
	font-size: 16px;
}

/* Custom Field Config */
.mlet-custom-field-config {
	margin-top: 15px;
}

/* Field Options Container */
.mlet-field-options-container {
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.mlet-field-options-container.hidden {
	display: none;
}

.mlet-field-options-container.visible {
	display: block;
}

/* Add Custom Field Button */
.mlet-add-custom-field-wrapper {
	margin-top: 15px;
	text-align: center;
}

.mlet-add-custom-field-btn {
	background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%) !important;
	color: white !important;
	border: none !important;
	padding: 12px 25px !important;
	border-radius: 8px !important;
	cursor: pointer !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	transition: all 0.3s ease !important;
	box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
}

.mlet-add-custom-field-btn:hover {
	background: linear-gradient(135deg, #388E3C 0%, #2E7D32 100%) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4) !important;
}

.mlet-add-custom-field-btn i {
	font-size: 18px;
}

/* Ticket Row Styles for Custom Forms */
.mlet-custom-field-config .mlet-ticket-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 15px;
}

.mlet-custom-field-config .mlet-ticket-row.full-width {
	grid-template-columns: 1fr;
}

.mlet-custom-field-config .mlet-ticket-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #333;
	font-size: 13px;
}

.mlet-custom-field-config .mlet-ticket-field input[type="text"],
.mlet-custom-field-config .mlet-ticket-field select,
.mlet-custom-field-config .mlet-ticket-field textarea {
	width: 100%;
	padding: 10px;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

.mlet-custom-field-config .mlet-ticket-field input[type="text"]:focus,
.mlet-custom-field-config .mlet-ticket-field select:focus,
.mlet-custom-field-config .mlet-ticket-field textarea:focus {
	border-color: #2196F3;
	outline: none;
	box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.mlet-custom-field-config .mlet-ticket-field small {
	display: block;
	margin-top: 5px;
	color: #666;
	font-size: 12px;
	font-style: italic;
}

.mlet-custom-field-config .mlet-ticket-field .required {
	color: #f44336;
	font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.mlet-custom-field-config .mlet-ticket-row {
		grid-template-columns: 1fr;
	}
	
	.mlet-custom-field-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

/* Form Lists */
.mlet-custom-fields-list {
	margin-bottom: 15px;
}

.mlet-custom-fields-list:empty {
	display: none;
}

/* Animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mlet-custom-field-item {
	animation: slideIn 0.3s ease;
}

/* Loading state for forms */
.mlet-form-loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.mlet-form-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2196F3;
	border-radius: 50%;
	animation: mlet-spin 1s linear infinite;
}

/* ==================================
   SEATING SYSTEM STYLES
   ================================== */

/* Seating Section Container */
.mlet-seating-section {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 3px solid #9C27B0;
}

.mlet-seating-header {
	background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
	border: 2px solid #9C27B0;
	border-radius: 12px;
	padding: 25px;
	margin-bottom: 25px;
}

/* Seating Section Item */
.mlet-seating-section-item {
	background: #fff;
	border: 2px solid #9C27B0;
	border-radius: 10px;
	padding: 25px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.mlet-seating-section-item:hover {
	box-shadow: 0 4px 16px rgba(156, 39, 176, 0.2);
}

.mlet-seating-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #e0e0e0;
}

.mlet-section-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #333;
}

.mlet-remove-seating-section {
	background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
	color: white;
	border: none;
	padding: 8px 15px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.mlet-remove-seating-section:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.mlet-seating-section-config {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.mlet-seating-section-config label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #555;
}

.mlet-seating-section-config input[type="text"],
.mlet-seating-section-config input[type="number"],
.mlet-seating-section-config select {
	width: 100%;
	padding: 10px;
	border: 2px solid #ddd;
	border-radius: 6px;
	transition: border-color 0.3s ease;
}

.mlet-seating-section-config input[type="text"]:focus,
.mlet-seating-section-config input[type="number"]:focus,
.mlet-seating-section-config select:focus {
	border-color: #9C27B0;
	outline: none;
}

.mlet-section-preview {
	margin-top: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 8px;
	border: 2px dashed #9C27B0;
}

#mlet-add-seating-section {
	background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
	border: none;
	padding: 12px 25px;
	font-size: 15px;
	font-weight: 700;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(156, 39, 176, 0.3);
	transition: all 0.3s ease;
}

#mlet-add-seating-section:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(156, 39, 176, 0.4);
}

/* Color picker styling */
input[type="color"] {
	width: 60px;
	height: 40px;
	border: 2px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
}

/* Sales Channel Section */
.mlet-sales-channel-section {
	background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 100%);
	padding: 20px;
	border-radius: 10px;
	margin-top: 20px;
	border: 2px solid #4CAF50;
}

.mlet-sales-channel-section .mlet-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
	color: #2E7D32;
	font-size: 16px;
}

.mlet-sales-channel-section .mlet-section-title i {
	font-size: 22px;
}

.mlet-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	background: white;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.mlet-checkbox-label:hover {
	border-color: #4CAF50;
	background: #f1f8f4;
}

.mlet-checkbox-label input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

.mlet-checkbox-label input[type="checkbox"]:checked + span {
	font-weight: 700;
	color: #4CAF50;
}

.mlet-checkbox-label span {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
}

.mlet-checkbox-label span i {
	font-size: 20px;
}

.mlet-channel-info {
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		max-height: 0;
	}
	to {
		opacity: 1;
		max-height: 100px;
	}
}

