/**
 * NightClub Manager — Front-end styles
 * Mapa SVG interactivo + Modal de reserva
 *
 * @package NightClubManager
 */

/* ═══════════════════════════════════════════════════════════════════════════
   Mapa wrapper
   ═══════════════════════════════════════════════════════════════════════════ */

.ncm-mapa-wrapper {
	position: relative;
	width: 100%;
}

.ncm-mapa-svg-container {
	width: 100%;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
}

.ncm-mapa-svg-container svg {
	display: block;
	width: 100%;
	height: auto;
}

/* Transiciones suaves en cambio de color */
.ncm-mapa-svg-container svg g[id] rect,
.ncm-mapa-svg-container svg g[id] text {
	transition: fill 0.25s ease, stroke 0.25s ease;
}

/* Hover en zonas disponibles */
.ncm-mapa-svg-container svg g.ncm-disponible:hover rect {
	filter: brightness(0.92);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Aviso sin zonas
   ═══════════════════════════════════════════════════════════════════════════ */

.ncm-mapa-notice {
	margin-top: 12px;
	padding: 10px 14px;
	background: #fefce8;
	border: 1px solid #fde047;
	border-radius: 6px;
	font-size: 14px;
	color: #713f12;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Placeholder en el editor de Elementor
   ═══════════════════════════════════════════════════════════════════════════ */

.ncm-editor-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 48px 24px;
	background: #f9fafb;
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	color: #6b7280;
	font-size: 14px;
	text-align: center;
}

.ncm-editor-placeholder .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #9ca3af;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Modal de reserva de zona
   ═══════════════════════════════════════════════════════════════════════════ */

.ncm-zona-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
}

.ncm-zona-modal.is-open {
	display: flex;
}

/* Overlay semitransparente */
.ncm-zona-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

/* Tarjeta modal */
.ncm-zona-modal-content {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 12px;
	width: min(400px, calc(100vw - 32px));
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	animation: ncmModalIn 0.2s ease;
}

@keyframes ncmModalIn {
	from { opacity: 0; transform: scale(0.95) translateY(8px); }
	to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

/* Botón cerrar */
.ncm-zona-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: #f3f4f6;
	border: none;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	color: #374151;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.ncm-zona-modal-close:hover {
	background: #e5e7eb;
}

/* Cabecera modal */
.ncm-modal-header {
	padding: 24px 24px 16px;
	border-bottom: 1px solid #f3f4f6;
}

.ncm-modal-zona-nombre {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 4px;
	padding: 0;
	line-height: 1.3;
}

.ncm-modal-zona-id {
	font-size: 12px;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: .06em;
}

/* Cuerpo modal */
.ncm-modal-body {
	padding: 20px 24px;
	display: flex;
	gap: 24px;
}

.ncm-modal-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ncm-modal-stat-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #9ca3af;
}

.ncm-modal-capacidad,
.ncm-modal-precio {
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}

.ncm-modal-stat-unit {
	font-size: 12px;
	color: #6b7280;
	margin-top: -2px;
}

/* Footer modal */
.ncm-modal-footer {
	padding: 16px 24px 24px;
}

.ncm-btn-reservar {
	display: block;
	width: 100%;
	padding: 14px 20px;
	background: #D4A437;
	color: #1f2937 !important;
	text-align: center;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 700;
	border-radius: 8px;
	transition: background 0.15s, transform 0.1s;
	cursor: pointer;
}

.ncm-btn-reservar:hover {
	background: #be123c;
	transform: translateY(-1px);
}

.ncm-btn-reservar:active {
	transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Error genérico
   ═══════════════════════════════════════════════════════════════════════════ */

.ncm-error {
	padding: 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #991b1b;
	font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Formulario de inscripción (Widget Elementor)
   ═══════════════════════════════════════════════════════════════════════════ */

.ncm-inscripcion-wrapper {
	width: 100%;
}

.ncm-inscripcion-inner {
	padding: 24px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

.ncm-inscripcion-aforo {
	margin: 0 0 16px;
	padding: 8px 14px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 6px;
	font-size: 13px;
	color: #166534;
	font-weight: 500;
}

/* Filas del formulario */
.ncm-form-row {
	margin-bottom: 14px;
}

.ncm-form-row--half {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

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

.ncm-form-field {
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ncm-form-row--half .ncm-form-field {
	margin-bottom: 0;
}

.ncm-form-field label {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
}

.ncm-form-field label span {
	color: #D4A437;
}

.ncm-form-field input[type="text"],
.ncm-form-field input[type="email"],
.ncm-form-field input[type="tel"],
.ncm-form-field input[type="date"] {
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	color: #111827;
	background: #fff;
	transition: border-color 0.15s;
	width: 100%;
	box-sizing: border-box;
}

.ncm-form-field input:focus {
	outline: none;
	border-color: #D4A437;
	box-shadow: 0 0 0 3px rgba(212, 164, 55, 0.2);
}

.ncm-form-submit-row {
	margin-top: 6px;
}

.ncm-inscripcion-submit {
	display: block;
	width: 100%;
	padding: 12px 20px;
	background: #D4A437;
	color: #1f2937;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s;
}

.ncm-inscripcion-submit:hover  { background: #be123c; transform: translateY(-1px); }
.ncm-inscripcion-submit:active { transform: translateY(0); }
.ncm-inscripcion-submit:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }

/* Feedback */
.ncm-inscripcion-feedback {
	margin-top: 14px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

.ncm-inscripcion-feedback--ok {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

.ncm-inscripcion-feedback--ko {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Botón Entrada General
   ═══════════════════════════════════════════════════════════════════════════ */

.ncm-entrada-general-btn {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	width: 100%;
	margin-top: 12px;
	padding: 14px 18px;
	background: #f0fdf4;
	border: 2px solid #86efac;
	border-radius: 8px;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ncm-entrada-general-btn:hover:not(:disabled) {
	background: #dcfce7;
	border-color: #4ade80;
}

.ncm-entrada-general-btn.ncm-eg-seleccionada {
	background: #FAC775;
	border-color: #854F0B;
	box-shadow: 0 0 0 3px rgba(133, 79, 11, 0.2);
}

.ncm-entrada-general-btn.ncm-agotada,
.ncm-entrada-general-btn:disabled {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #991b1b;
	cursor: not-allowed;
	opacity: 0.7;
}

.ncm-eg-label {
	font-weight: 600;
	font-size: 15px;
	flex: 1 1 auto;
	min-width: 0;
}

.ncm-eg-precio {
	font-size: 15px;
	font-weight: 700;
	color: #166534;
}

.ncm-entrada-general-btn.ncm-eg-seleccionada .ncm-eg-precio {
	color: #854F0B;
}

.ncm-eg-stock {
	font-size: 12px;
	color: #6b7280;
}

.ncm-eg-agotada {
	font-size: 12px;
	font-weight: 600;
	color: #991b1b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Móvil: stock/agotada baja a su propia línea para no desbordar el botón. */
@media (max-width: 600px) {
	.ncm-entrada-general-btn .ncm-eg-stock,
	.ncm-entrada-general-btn .ncm-eg-agotada {
		flex-basis: 100%;
		text-align: right;
		margin-top: 2px;
	}
}
