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

/* ==========================================================================
   Tickets Wrapper
   ========================================================================== */

.mlet-tickets-wrapper {
	width: 100%;
	margin: 20px 0;
}

.mlet-tickets-container {
	margin-bottom: 20px;
}

/* ==========================================================================
   Ticket Item
   ========================================================================== */

.mlet-ticket-item {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 25px;
	margin-bottom: 20px;
	position: relative;
	transition: box-shadow 0.3s ease;
}

.mlet-ticket-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Ticket Header
   ========================================================================== */

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

.mlet-ticket-title {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mlet-ticket-title i {
	color: #2196F3;
	font-size: 24px;
}

.mlet-remove-ticket-btn {
	background: #f44336;
	color: white;
	border: none;
	padding: 8px 15px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 5px;
}

.mlet-remove-ticket-btn:hover {
	background: #d32f2f;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

/* ==========================================================================
   Ticket Fields
   ========================================================================== */

.mlet-ticket-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 15px;
}

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

.mlet-ticket-field {
	display: flex;
	flex-direction: column;
}

.mlet-ticket-field label {
	font-weight: 600;
	margin-bottom: 8px;
	color: #555;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.mlet-ticket-field label .required {
	color: #f44336;
	font-size: 16px;
}

.mlet-ticket-field label i {
	font-size: 18px;
}

.mlet-ticket-field input[type="text"],
.mlet-ticket-field input[type="number"],
.mlet-ticket-field input[type="date"],
.mlet-ticket-field textarea,
.mlet-ticket-field select {
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-size: 14px;
	transition: all 0.3s ease;
	background: white;
	font-family: inherit;
}

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

.mlet-ticket-field textarea {
	min-height: 80px;
	resize: vertical;
}

.mlet-ticket-field small {
	color: #777;
	font-size: 12px;
	margin-top: 5px;
	font-style: italic;
}

/* ==========================================================================
   Early Bird Section
   ========================================================================== */

.mlet-early-bird-section {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
	border: 2px solid #ffc107;
	border-radius: 8px;
	padding: 20px;
	margin-top: 20px;
	position: relative;
}

.mlet-early-bird-section::before {
	content: "⚡";
	position: absolute;
	top: -15px;
	left: 20px;
	background: #ffc107;
	width: 35px;
	height: 35px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.mlet-early-bird-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
}

.mlet-early-bird-toggle input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 0;
	cursor: pointer;
}

.mlet-early-bird-toggle label {
	margin: 0;
	font-weight: 600;
	color: #856404;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
}

.mlet-early-bird-toggle label i {
	color: #f39c12;
	font-size: 20px;
}

.mlet-early-bird-fields {
	display: none;
	animation: fadeIn 0.3s ease;
}

.mlet-early-bird-fields.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   Add Ticket Button
   ========================================================================== */

.mlet-add-ticket-btn-wrapper {
	text-align: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 2px dashed #e0e0e0;
}

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

.mlet-add-ticket-btn:hover {
	background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.mlet-add-ticket-btn:active {
	transform: translateY(0);
}

.mlet-add-ticket-btn i {
	font-size: 20px;
}

/* ==========================================================================
   Ticket Display on Single Listing
   ========================================================================== */

.mlet-tickets-display {
	background: #fff;
	border-radius: 12px;
	padding: 30px;
	margin: 30px 0;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.mlet-tickets-display-title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 25px;
	color: #333;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mlet-tickets-display-title i {
	color: #2196F3;
	font-size: 28px;
}

.mlet-ticket-card {
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 15px;
	border: 1px solid #e0e0e0;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.mlet-ticket-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 5px;
	height: 100%;
	background: linear-gradient(180deg, #2196F3 0%, #1976D2 100%);
}

.mlet-ticket-card:hover {
	transform: translateX(5px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.mlet-ticket-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 15px;
}

.mlet-ticket-card-name {
	font-size: 20px;
	font-weight: 600;
	color: #333;
}

.mlet-ticket-card-price {
	font-size: 24px;
	font-weight: 700;
	color: #2196F3;
}

.mlet-ticket-card-price.early-bird {
	color: #4CAF50;
}

.mlet-ticket-card-price .original-price {
	text-decoration: line-through;
	font-size: 16px;
	color: #999;
	margin-left: 8px;
}

.mlet-ticket-card-description {
	color: #666;
	margin-bottom: 15px;
	line-height: 1.6;
}

.mlet-ticket-card-benefits {
	background: rgba(255, 255, 255, 0.5);
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 15px;
}

.mlet-ticket-card-benefits ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mlet-ticket-card-benefits li {
	padding: 5px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mlet-ticket-card-benefits li::before {
	content: "✓";
	color: #4CAF50;
	font-weight: bold;
	font-size: 18px;
}

.mlet-ticket-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 15px;
	font-size: 13px;
	color: #777;
}

.mlet-ticket-card-meta span {
	display: flex;
	align-items: center;
	gap: 5px;
}

.mlet-ticket-card-meta i {
	color: #2196F3;
}

.mlet-ticket-card-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.mlet-add-to-cart-btn {
	background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
	color: white;
	border: none;
	padding: 12px 25px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	transition: all 0.3s ease;
	flex: 1;
	box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.mlet-add-to-cart-btn:hover {
	background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.mlet-ticket-sold-out {
	background: #f44336;
	color: white;
	padding: 12px 25px;
	border-radius: 8px;
	text-align: center;
	font-weight: 600;
	flex: 1;
}

.mlet-early-bird-badge {
	background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
	color: #fff;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-bottom: 10px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
	.mlet-ticket-row {
		grid-template-columns: 1fr;
	}
	
	.mlet-ticket-header {
		flex-direction: column;
		gap: 15px;
		align-items: flex-start;
	}
	
	.mlet-remove-ticket-btn {
		width: 100%;
		justify-content: center;
	}
	
	.mlet-ticket-card-header {
		flex-direction: column;
		gap: 10px;
	}
	
	.mlet-add-to-cart-btn {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.mlet-ticket-item {
		padding: 15px;
	}
	
	.mlet-tickets-display {
		padding: 20px 15px;
	}
	
	.mlet-ticket-title {
		font-size: 16px;
	}
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.mlet-loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.mlet-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2196F3;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

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







/* ========================================================================== */
/*   Modal Forms System */
/* ========================================================================== */

/* Modal Steps */
.mlet-modal-steps {
    position: relative;
}

.mlet-modal-step {
    display: none;
}

.mlet-modal-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.mlet-step-header {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
}

.mlet-step-header h3 {
    margin: 0;
    color: #2196F3;
    font-size: 20px;
    font-weight: 700;
}

.mlet-step-content {
    padding: 10px 0;
}

/* Form Items */
.mlet-form-item {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

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

.mlet-form-header h4 {
    margin: 0 0 20px 0;
    color: #2196F3;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid #2196F3;
}

/* Form Fields */
.mlet-form-body {
    margin-top: 15px;
}

.mlet-form-field {
    margin-bottom: 20px;
}

.mlet-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.mlet-form-field .required {
    color: #f44336;
    font-weight: 700;
}

.mlet-form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.mlet-form-input:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.mlet-form-input.mlet-error {
    border-color: #f44336;
}

/* Form Row (2 columns) */
.mlet-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .mlet-form-row {
        grid-template-columns: 1fr;
    }
}

/* Radio and Checkbox Labels */
.mlet-radio-label,
.mlet-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
}

.mlet-radio-label input,
.mlet-checkbox-label input {
    width: auto;
    margin: 0;
}

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

/* Back Button */
.mlet-back-btn {
    background: linear-gradient(135deg, #9E9E9E 0%, #757575 100%);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mlet-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(158, 158, 158, 0.4);
}

/* ==================================
   SEATING MAP STYLES (Frontend)
   ================================== */

.mlet-seating-map-container {
    margin: 20px 0;
}

.mlet-seating-header {
    text-align: center;
    margin-bottom: 20px;
}

.mlet-seating-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
}

.mlet-seating-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Seating Legend */
.mlet-seating-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.mlet-seating-legend > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mlet-seating-legend > div div {
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

.mlet-seating-legend span {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

/* Seating Section */
.mlet-seating-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mlet-seating-section h4 {
    margin: 0 0 15px 0;
    font-weight: 700;
    text-align: center;
    font-size: 18px;
}

/* Seat Rows */
.mlet-section-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.mlet-seat-row {
    display: flex;
    gap: 5px;
    align-items: center;
}

.mlet-row-label {
    width: 30px;
    text-align: right;
    font-weight: 700;
    color: #666;
    font-size: 14px;
}

/* Individual Seats */
.mlet-seat {
    width: 35px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    user-select: none;
}

.mlet-seat-available:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mlet-seat-unavailable {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.mlet-seat-selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px #2196F3;
}

/* Selected Seats Info */
.mlet-selected-seats-info {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border: 2px solid #2196F3;
    border-radius: 8px;
}

.mlet-selected-seats-info h4 {
    margin: 0 0 10px 0;
    color: #1976D2;
    font-weight: 700;
    font-size: 16px;
}

.mlet-selected-seats-list {
    min-height: 30px;
}

.mlet-selected-seats-list > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mlet-selected-seats-list > div > div {
    padding: 6px 12px;
    background: #2196F3;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* Responsive Design for Seating Map */
@media (max-width: 768px) {
    .mlet-seat {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
    
    .mlet-row-label {
        width: 25px;
        font-size: 12px;
    }
    
    .mlet-seating-section {
        padding: 15px;
    }
    
    .mlet-seating-legend {
        gap: 15px;
    }
    
    .mlet-seating-legend > div div {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .mlet-seat {
        width: 25px;
        height: 25px;
        font-size: 9px;
    }
    
    .mlet-seat-row {
        gap: 3px;
    }
    
    .mlet-section-rows {
        gap: 5px;
    }
    
    .mlet-seating-legend {
        flex-direction: column;
        gap: 10px;
    }
}

