/**
 * Event Shortcodes Styles
 *
 * Estilos para los shortcodes de eventos en páginas de Elementor.
 *
 * @package Vitiks\Eventos
 */

/* ==========================================================================
   Event Tickets Shortcode
   ========================================================================== */

.vtks-event-tickets {
	max-width: 600px;
	margin: 0 auto;
	font-family: inherit;
}

.vtks-ticket-type {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem;
	margin-bottom: 1rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.vtks-ticket-type:hover {
	border-color: #d1d5db;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.vtks-ticket-type:last-child {
	margin-bottom: 0;
}

.vtks-ticket-info {
	flex: 1;
	min-width: 200px;
}

.vtks-ticket-name {
	margin: 0 0 0.25rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: #1f2937;
}

.vtks-ticket-description {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	color: #6b7280;
	line-height: 1.4;
}

.vtks-ticket-price {
	font-size: 1.25rem;
	font-weight: 700;
	color: #059669;
}

.vtks-ticket-price .vtks-free {
	color: #059669;
}

.vtks-ticket-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

/* Quantity selector */
.vtks-quantity-selector {
	display: flex;
	align-items: center;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	overflow: hidden;
}

.vtks-qty-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: #f9fafb;
	border: none;
	color: #374151;
	font-size: 1.25rem;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.vtks-qty-btn:hover {
	background: #f3f4f6;
}

.vtks-qty-btn:active {
	background: #e5e7eb;
}

.vtks-qty-input {
	width: 50px;
	height: 36px;
	padding: 0;
	border: none;
	border-left: 1px solid #d1d5db;
	border-right: 1px solid #d1d5db;
	text-align: center;
	font-size: 1rem;
	font-weight: 500;
	color: #1f2937;
	-moz-appearance: textfield;
}

.vtks-qty-input::-webkit-outer-spin-button,
.vtks-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.vtks-qty-input:focus {
	outline: none;
	background: #f0fdf4;
}

/* Buy button */
.vtks-btn-buy {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.vtks-btn-buy:hover {
	background: #1d4ed8;
}

.vtks-btn-buy:active {
	transform: scale(0.98);
}

.vtks-btn-buy:disabled {
	background: #9ca3af;
	cursor: not-allowed;
}

.vtks-btn-buy .vtks-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid transparent;
	border-top-color: #fff;
	border-radius: 50%;
	animation: vtks-spin 0.6s linear infinite;
}

.vtks-btn-buy.loading .vtks-spinner {
	display: block;
}

.vtks-btn-buy.loading .vtks-btn-text {
	opacity: 0.7;
}

@keyframes vtks-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Sold out / unavailable */
.vtks-ticket-type.vtks-sold-out {
	opacity: 0.6;
	background: #f9fafb;
}

.vtks-sold-out-badge {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	background: #ef4444;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	border-radius: 4px;
}

/* Available count */
.vtks-ticket-available {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	color: #9ca3af;
}

.vtks-ticket-available.low-stock {
	color: #f59e0b;
}

/* ==========================================================================
   Event Info Shortcode
   ========================================================================== */

.vtks-event-info {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.vtks-info-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	min-width: 200px;
}

.vtks-info-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: #eff6ff;
	border-radius: 8px;
	flex-shrink: 0;
}

.vtks-info-icon svg {
	width: 20px;
	height: 20px;
	color: #2563eb;
}

.vtks-info-content {
	flex: 1;
}

.vtks-info-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 500;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.125rem;
}

.vtks-info-value {
	font-size: 1rem;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.3;
}

/* ==========================================================================
   Event Countdown Shortcode
   ========================================================================== */

.vtks-event-countdown {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem 0;
}

.vtks-countdown-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 60px;
	padding: 0 0.5rem;
}

.vtks-countdown-value {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1;
	color: inherit;
}

.vtks-countdown-label {
	margin-top: 0.25rem;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: lowercase;
	color: inherit;
	opacity: 0.7;
}

/* Countdown expired state */
.vtks-countdown-expired {
	padding: 1rem;
	text-align: center;
}

.vtks-countdown-expired p {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	color: inherit;
	opacity: 0.8;
}

/* ==========================================================================
   Messages & Alerts
   ========================================================================== */

.vtks-event-message {
	padding: 1rem 1.25rem;
	border-radius: 8px;
	font-size: 0.9375rem;
}

.vtks-event-message.error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.vtks-event-message.warning {
	background: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
}

.vtks-event-message.info {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e40af;
}

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

@media (max-width: 640px) {
	.vtks-ticket-type {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.vtks-ticket-info {
		min-width: 100%;
	}

	.vtks-ticket-actions {
		justify-content: center;
		margin-top: 0.5rem;
	}

	.vtks-event-info {
		flex-direction: column;
		gap: 1rem;
	}

	.vtks-info-item {
		min-width: 100%;
	}

	.vtks-event-countdown {
		gap: 0.25rem;
	}

	.vtks-countdown-item {
		min-width: 50px;
		padding: 0 0.375rem;
	}

	.vtks-countdown-value {
		font-size: 1.75rem;
	}

	.vtks-countdown-label {
		font-size: 0.625rem;
	}
}

/* ==========================================================================
   VIP Registration Form
   ========================================================================== */

.vtks-vip-register {
	max-width: 500px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
}

.vtks-vip-header {
	background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
	color: #fff;
	padding: 1.5rem;
	text-align: center;
}

.vtks-vip-badge {
	display: inline-block;
	padding: 0.375rem 1rem;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.75rem;
}

.vtks-vip-title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
}

.vtks-vip-ticket-type {
	margin: 0;
	font-size: 1rem;
	opacity: 0.9;
}

.vtks-vip-free,
.vtks-vip-discount {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 0.125rem 0.5rem;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 4px;
	font-size: 0.875rem;
}

.vtks-vip-form {
	padding: 1.5rem;
}

.vtks-vip-fields {
	margin-bottom: 1.5rem;
}

.vtks-field-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
}

.vtks-field-row:last-child {
	margin-bottom: 0;
}

.vtks-field {
	flex: 1;
}

.vtks-field label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
}

.vtks-field label .required {
	color: #ef4444;
}

.vtks-field input,
.vtks-field select,
.vtks-field textarea {
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 1rem;
	color: #1f2937;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vtks-field input:focus,
.vtks-field select:focus,
.vtks-field textarea:focus {
	outline: none;
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.vtks-field input[readonly] {
	background: #f9fafb;
	color: #6b7280;
	cursor: not-allowed;
}

.vtks-vip-custom-fields {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #e5e7eb;
}

.vtks-vip-custom-fields h4 {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: #374151;
}

.vtks-vip-custom-fields .vtks-field {
	margin-bottom: 1rem;
}

.vtks-vip-submit {
	text-align: center;
}

.vtks-vip-button {
	display: inline-block;
	width: 100%;
	padding: 0.875rem 2rem;
	background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vtks-vip-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.vtks-vip-button:active {
	transform: translateY(0);
}

.vtks-vip-button:disabled {
	background: #9ca3af;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.vtks-vip-message {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 6px;
	text-align: center;
	font-size: 0.875rem;
}

.vtks-vip-message.success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.vtks-vip-message.error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

/* VIP Completed State */
.vtks-vip-completed {
	max-width: 500px;
	margin: 0 auto;
	padding: 3rem 2rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	text-align: center;
}

.vtks-vip-success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	margin: 0 auto 1.5rem;
	background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
	border-radius: 50%;
	font-size: 2.5rem;
	color: #fff;
}

.vtks-vip-completed h3 {
	margin: 0 0 1rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #1f2937;
}

.vtks-vip-completed p {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	color: #6b7280;
}

.vtks-vip-ticket-sent {
	margin-top: 1rem !important;
	padding-top: 1rem;
	border-top: 1px solid #e5e7eb;
	color: #059669 !important;
	font-weight: 500;
}

/* ==========================================================================
   Affiliate Discount Banner
   ========================================================================== */

.vtks-affiliate-discount-banner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	margin-bottom: 1.5rem;
	background: linear-gradient(135deg, #059669 0%, #10b981 100%);
	border-radius: 8px;
	color: #fff;
}

.vtks-discount-icon {
	font-size: 1.5rem;
}

.vtks-discount-text {
	font-size: 1rem;
	font-weight: 600;
}

/* Price with discount */
.vtks-price-original {
	text-decoration: line-through;
	color: #9ca3af;
	font-size: 0.875rem;
	margin-right: 0.5rem;
}

.vtks-price-discounted {
	color: #059669;
	font-weight: 700;
}

/* ==========================================================================
   Shortcode Messages
   ========================================================================== */

.vtks-shortcode-error,
.vtks-shortcode-message {
	max-width: 600px;
	margin: 0 auto;
	padding: 1.5rem;
	border-radius: 8px;
	text-align: center;
}

.vtks-shortcode-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.vtks-shortcode-message.vtks-message-past,
.vtks-shortcode-message.vtks-message-no-tickets {
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	color: #6b7280;
}

.vtks-shortcode-message.vtks-message-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.vtks-shortcode-message.vtks-message-expired,
.vtks-shortcode-message.vtks-message-cancelled {
	background: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
}

/* ==========================================================================
   Dark Mode Support (for themes that use it)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
	.vtks-event-tickets,
	.vtks-event-info {
		background: #1f2937;
		border-color: #374151;
	}

	.vtks-ticket-type {
		background: #111827;
		border-color: #374151;
	}

	.vtks-ticket-type:hover {
		border-color: #4b5563;
	}

	.vtks-ticket-name {
		color: #f9fafb;
	}

	.vtks-ticket-description {
		color: #9ca3af;
	}

	.vtks-qty-btn {
		background: #374151;
		color: #f9fafb;
	}

	.vtks-qty-btn:hover {
		background: #4b5563;
	}

	.vtks-qty-input {
		background: #1f2937;
		color: #f9fafb;
		border-color: #374151;
	}

	.vtks-info-icon {
		background: #1e3a8a;
	}

	.vtks-info-value {
		color: #f9fafb;
	}

	.vtks-info-label {
		color: #9ca3af;
	}
}
