/**
 * ==============================================================================
 * Archivo: match-create-page.css
 * Ruta: localpadel/includes/modules/match-create-page/match-create-page.css
 *
 * Descripción:
 *   UI iOS premium (opción 2) para Crear Partido:
 *   - Preview card arriba (live)
 *   - Controles con altura uniforme (select/input/textarea/static)
 *   - Sticky bar siempre visible con botón “Publicar” + estado
 *   - Minimal copy
 *   - ✅ Overlay bloqueante si NO hay sesión
 *
 * Versión: 1.2.1
 * Autor: Alberto Aranda Aranda
 * Último cambio: 2025-12-22 Europe/Madrid
 * ==============================================================================
 */

.lp-osans,
.lp-osans *{
	font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, Arial, sans-serif;
}

.lp-match-create{
	max-width: 980px;
	margin: 14px auto 56px auto;
	padding: 0 14px;

	--lp-brand: #2C4A9C;
	--lp-ink: #0f172a;
	--lp-muted: #6b7280;
	--lp-border: rgba(15,23,42,.08);
	--lp-shadow: 0 10px 30px rgba(15,23,42,.06);
	--lp-radius: 22px;
	--lp-radius-sm: 14px;

	/* uniform control height */
	--lp-control-h: 46px;
	--lp-control-pad-x: 12px;
	--lp-control-pad-y: 10px;
}

.lp-card{
	background:#fff;
	border: 1px solid var(--lp-border);
	border-radius: var(--lp-radius);
	padding: 14px;
	box-shadow: var(--lp-shadow);
}

/* --------------------------------------------------------------------------
 * Preview card (header)
 * ----------------------------------------------------------------------- */
.lp-mc-preview{
	padding: 14px;
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(1200px 420px at 20% -10%, rgba(44,74,156,.18), transparent 60%),
		radial-gradient(900px 360px at 80% 0%, rgba(44,74,156,.10), transparent 55%),
		#fff;
}

.lp-mc-preview__row{
	display:flex;
	gap: 12px;
	align-items:flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
}

.lp-mc-preview__title{
	display:flex;
	gap: 8px;
	align-items:center;
	flex-wrap: wrap;
	color: var(--lp-ink);
	font-size: 18px;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.lp-mc-preview__city{
	font-weight: 700;
}

.lp-mc-preview__date{
	color: rgba(15,23,42,.72);
	font-weight: 600;
}

.lp-mc-dot{
	color: rgba(15,23,42,.30);
}

.lp-mc-preview__chips{
	display:flex;
	gap: 8px;
	align-items:center;
	flex-wrap: wrap;
}

.lp-mc-chip{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	height: 30px;
	padding: 0 10px;
	border-radius: 999px;
	border: 1px solid rgba(15,23,42,.10);
	background: rgba(15,23,42,.02);
	color: rgba(15,23,42,.76);
	font-size: 12px;
	letter-spacing: -0.01em;
}

.lp-mc-chip--brand{
	background: rgba(44,74,156,.10);
	border-color: rgba(44,74,156,.18);
	color: rgba(44,74,156,.95);
}

.lp-mc-preview__sub{
	margin-top: 10px;
	color: rgba(15,23,42,.62);
	font-size: 13px;
	display:flex;
	gap: 8px;
	flex-wrap: wrap;
}

.lp-mc-progress{
	margin-top: 12px;
	height: 8px;
	border-radius: 999px;
	background: rgba(15,23,42,.06);
	overflow: hidden;
}

.lp-mc-progress__bar{
	height: 100%;
	width: 0%;
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(44,74,156,1), rgba(44,74,156,.65));
	transition: width .18s ease;
}

.lp-mc-req{
	margin-top: 10px;
	display:flex;
	gap: 8px;
	flex-wrap: wrap;
}

.lp-mc-req__pill{
	display:inline-flex;
	align-items:center;
	height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	border: 1px solid rgba(15,23,42,.10);
	background: rgba(15,23,42,.02);
	color: rgba(15,23,42,.70);
	font-size: 12px;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.lp-mc-req__pill.is-ok{
	border-color: rgba(16,185,129,.22);
	background: rgba(16,185,129,.10);
	color: rgba(6,95,70,.95);
}

/* Flash */
.lp-mc-flash{ margin-top: 12px; }
.lp-mc-flash--ok{
	border-color: rgba(16,185,129,.22);
	background: rgba(16,185,129,.06);
}
.lp-mc-flash--err{
	border-color: rgba(239,68,68,.22);
	background: rgba(239,68,68,.05);
}
.lp-mc-flash__t{
	color: var(--lp-ink);
	font-size: 14px;
	letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
 * Form blocks
 * ----------------------------------------------------------------------- */
.lp-mc-card{ margin-top: 12px; }

.lp-mc-block{
	padding: 0;
}

.lp-mc-h{
	font-size: 13px;
	color: rgba(15,23,42,.72);
	letter-spacing: -0.01em;
	margin: 2px 0 10px 0;
}

/* Grid */
.lp-mc-grid{
	display:grid;
	gap: 10px;
}

@media (min-width: 860px){
	.lp-mc-grid--2{ grid-template-columns: 1fr 1fr; }
	.lp-mc-grid--3{ grid-template-columns: 1fr 1fr 1fr; }
}

/* Labels */
.lp-label{
	display:block;
	font-size:12px;
	color: rgba(15,23,42,.55);
	margin-bottom:6px;
}

.lp-req{
	color: rgba(239,68,68,.85);
}

/* Controls: uniform height */
.lp-control{
	height: var(--lp-control-h);
	min-height: var(--lp-control-h);
	border-radius: var(--lp-radius-sm);
	border: 1px solid rgba(15,23,42,.10);
	background: #fff;
	color: var(--lp-ink);
	font-size: 13px;
	outline: none;
	padding: var(--lp-control-pad-y) var(--lp-control-pad-x);
	box-sizing: border-box;
	transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
	width: 100%;
	max-width: 100%;
}

/* Make selects look consistent */
.lp-select.lp-control{
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, rgba(15,23,42,.55) 50%),
		linear-gradient(135deg, rgba(15,23,42,.55) 50%, transparent 50%),
		linear-gradient(to right, transparent, transparent);
	background-position:
		calc(100% - 18px) 50%,
		calc(100% - 13px) 50%,
		100% 0;
	background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
	background-repeat: no-repeat;
	padding-right: 38px;
}

/* Textarea: same height as others */
.lp-textarea.lp-control{
	resize: none;
	line-height: 1.25;
	padding-top: 12px;
	padding-bottom: 12px;
}

/* Static */
.lp-mc-static.lp-control{
	display:flex;
	align-items:center;
	justify-content:center;
	background: rgba(15,23,42,.02);
	border-color: rgba(15,23,42,.08);
}

.lp-mc-static__main{
	font-size: 14px;
	color: rgba(15,23,42,.75);
	letter-spacing: -0.01em;
}

@media (hover:hover){
	.lp-control:hover{
		border-color: rgba(15,23,42,.16);
		transform: translateY(-1px);
	}
}

.lp-control:focus,
.lp-control:focus-visible{
	border-color: rgba(44,74,156,.48);
	box-shadow: 0 0 0 3px rgba(44,74,156,.12);
	transform: none;
}

/* Warn */
.lp-mc-warn{
	margin-top: 10px;
	border-radius: 18px;
	padding: 12px;
	border: 1px solid rgba(245,158,11,.22);
	background: rgba(245,158,11,.08);
}
.lp-mc-warn__t{ color: rgba(15,23,42,.85); font-size: 13px; }
.lp-mc-warn__m{ margin-top: 6px; color: rgba(15,23,42,.60); font-size: 12px; }

.lp-muted{
	color: var(--lp-muted);
	font-size: 13px;
	line-height: 1.35;
}

/* --------------------------------------------------------------------------
 * Sticky publish bar
 * ----------------------------------------------------------------------- */
.lp-mc-bottom-spacer{
	height: 92px;
}

.lp-mc-stickybar{
	position: sticky;
	bottom: 10px;
	margin-top: 14px;
	z-index: 20;
}

.lp-mc-stickybar__inner{
	display:flex;
	align-items:center;
	gap: 12px;
	padding: 12px;
	border-radius: 18px;
	border: 1px solid rgba(15,23,42,.10);
	background: rgba(255,255,255,.86);
	backdrop-filter: blur(10px);
	box-shadow: 0 16px 40px rgba(15,23,42,.10);
}

.lp-mc-stickybar__hint{
	font-size: 13px;
	color: rgba(15,23,42,.62);
	letter-spacing: -0.01em;
}

.lp-mc-stickybar__hint.is-ready{
	color: rgba(6,95,70,.92);
}

/* Buttons */
.lp-btn{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	height: var(--lp-control-h);
	padding: 0 14px;
	border-radius: var(--lp-radius-sm);
	border: 1px solid rgba(15,23,42,.10);
	background: #fff;
	color: var(--lp-ink);
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
	transition: transform .08s ease, border-color .12s ease, box-shadow .12s ease, opacity .12s ease;
	-webkit-tap-highlight-color: transparent;
}

.lp-btn:active{ transform: translateY(1px); }

.lp-btn--primary{
	background: var(--lp-brand);
	border-color: rgba(44,74,156,.45);
	color: #fff;
	box-shadow: 0 14px 32px rgba(44,74,156,.22);
}

@media (hover:hover){
	.lp-btn--primary:hover{
		border-color: rgba(44,74,156,.70);
		box-shadow: 0 18px 44px rgba(44,74,156,.26);
	}
}

.lp-mc-publish[disabled],
.lp-mc-publish[aria-disabled="true"]{
	opacity: .55;
	cursor: not-allowed;
	box-shadow: none !important;
	transform: none !important;
	filter: grayscale(.08);
}

.lp-mc-publish.is-ready{
	opacity: 1;
}

@media (max-width: 520px){
	.lp-mc-stickybar__inner{
		flex-direction: column;
		align-items: stretch;
	}
	.lp-mc-stickybar__hint{
		text-align: center;
	}
}

/* --------------------------------------------------------------------------
 * ✅ Auth overlay (bloqueo total si NO hay sesión)
 * ----------------------------------------------------------------------- */
.lp-mc-lock{
	overflow: hidden !important;
}

.lp-mc-auth-overlay{
	position: fixed;
	inset: 0;
	z-index: 9999;
	display:flex;
	align-items:center;
	justify-content:center;
	padding: 18px;
	background: rgba(15,23,42,.55);
	backdrop-filter: blur(8px);
}

.lp-mc-auth-overlay__card{
	max-width: 520px;
	width: 100%;
	border-radius: 26px;
	padding: 18px;
	box-shadow: 0 30px 80px rgba(0,0,0,.25);
	background:
		radial-gradient(900px 360px at 20% 0%, rgba(44,74,156,.18), transparent 60%),
		#fff;
}

.lp-mc-auth-overlay__badge{
	display:inline-flex;
	align-items:center;
	height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	background: rgba(44,74,156,.10);
	border: 1px solid rgba(44,74,156,.18);
	color: rgba(44,74,156,.95);
	font-size: 12px;
	margin-bottom: 10px;
}

.lp-mc-auth-overlay__title{
	font-size: 18px;
	letter-spacing: -0.02em;
	color: var(--lp-ink);
	margin: 0 0 6px 0;
}

.lp-mc-auth-overlay__sub{
	font-size: 13px;
	color: rgba(15,23,42,.70);
	margin: 0 0 14px 0;
}

.lp-mc-auth-overlay__actions{
	display:flex;
	flex-direction: column;
	gap: 10px;
}

.lp-mc-auth-overlay__btn{
	width: 100%;
}

.lp-mc-auth-overlay__hint{
	font-size: 12px;
	color: rgba(15,23,42,.55);
	text-align: center;
}
