/* L'Aliança – venda d'entrades (finestra de compra i pàgina d'entrades) */
:root { --lga-tk: var(--lga-accent, #b5121b); }

.lga-boto--inactiu { opacity: .75; cursor: default; pointer-events: none; }
button.lga-boto { border: 0; cursor: pointer; font: inherit; }

html.lga-tk-obert { overflow: hidden; }
.lga-tk-modal[hidden] { display: none; }
.lga-tk-modal {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center; padding: 16px;
	font-family: "DM Sans", system-ui, sans-serif; color: #222;
}
.lga-tk-modal__fons { position: absolute; inset: 0; background: rgba(20, 10, 15, .72); }
.lga-tk-modal__caixa {
	position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
	padding: 30px 28px 24px; border-radius: 18px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.lga-tk-modal .lga-tk-modal__tanca {
	position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; min-height: 0; padding: 0 !important;
	border: 0 !important; border-radius: 50%; background: transparent !important; color: #555 !important;
	font-size: 28px; line-height: 1; cursor: pointer; box-shadow: none !important;
}
.lga-tk-etiqueta { margin: 0 0 4px; color: var(--lga-tk); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lga-tk-titol { margin: 0; font-size: 22px; line-height: 1.2; color: #222; }
.lga-tk-quan { margin: 4px 0 18px; color: #555; font-size: 15px; }

.lga-tk-tipus { list-style: none; margin: 0 0 12px; padding: 0; }
.lga-tk-tipus__fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.lga-tk-tipus__fila small { color: #666; }
.lga-tk-tipus__fila.is-inactiu { color: #888; }
.lga-tk-preu { color: var(--lga-tk); font-weight: 700; margin-left: 6px; }
.lga-tk-stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.lga-tk-modal .lga-tk-stepper button {
	width: 38px; height: 38px; min-height: 0; padding: 0 !important; border: 2px solid var(--lga-tk) !important; border-radius: 50% !important;
	background: #fff !important; color: var(--lga-tk) !important; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: none !important;
}
.lga-tk-modal .lga-tk-stepper button:disabled { opacity: .3; cursor: default; }
.lga-tk-stepper output { min-width: 28px; text-align: center; font-size: 18px; font-weight: 700; }
.lga-tk-total { margin: 8px 0 16px; font-size: 16px; }

.lga-tk-persona { margin: 0 0 14px; padding: 12px 14px 4px; border: 1px solid #e3e3e3; border-radius: 12px; }
.lga-tk-persona legend { padding: 0 6px; font-weight: 700; font-size: 14px; }
.lga-tk-camp { margin: 0 0 10px; }
.lga-tk-camp label { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.lga-tk-modal .lga-tk-camp input {
	width: 100%; box-sizing: border-box; height: auto !important; padding: 10px 12px !important;
	border: 2px solid #ccc !important; border-radius: 10px !important; font: inherit; font-size: 16px;
}
.lga-tk-modal .lga-tk-camp input:focus { outline: none; border-color: var(--lga-tk) !important; }
.lga-tk-modal [aria-invalid="true"] { border-color: #b32d2e !important; }
.lga-tk-camp small, .lga-tk-ajuda, .lga-tk-condicions { display: block; color: #666; font-size: 13px; line-height: 1.4; margin-top: 4px; }
.lga-tk-condicions { margin: 4px 0 12px; }
.lga-tk-err { display: block; color: #b32d2e; font-size: 13px; font-weight: 600; }
.lga-tk-err:empty { display: none; }
.lga-tk-accepta { font-size: 14px; }
.lga-tk-missatge { color: #b32d2e; font-weight: 600; min-height: 1em; margin: 6px 0; }
.lga-tk-missatge:empty { display: none; }
.lga-tk-ok { color: #1a7f37; font-weight: 600; font-size: 16px; }
.lga-tk-error { color: #b32d2e; font-weight: 600; }

.lga-tk-modal .lga-tk-boto, a.lga-tk-boto {
	display: block; width: 100%; box-sizing: border-box; min-height: 48px; padding: 12px 24px !important;
	border: 2px solid var(--lga-tk) !important; border-radius: 50px !important; background: var(--lga-tk) !important; color: #fff !important;
	font: 900 15px/1.2 "DM Sans", sans-serif !important; text-transform: uppercase !important; text-align: center; text-decoration: none !important;
	cursor: pointer; box-shadow: none !important; transition: background-color .3s, color .3s;
}
.lga-tk-modal .lga-tk-boto:hover:not(:disabled), a.lga-tk-boto:hover { background: #fff !important; color: var(--lga-tk) !important; }
.lga-tk-modal .lga-tk-boto:disabled { opacity: .5; cursor: default; }
.lga-tk-enrere { text-align: center; margin: 12px 0 0; }
.lga-tk-modal .lga-tk-enllac { padding: 0 !important; border: 0 !important; background: none !important; color: var(--lga-tk) !important; font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 0; box-shadow: none !important; text-transform: none !important; }

/* Pàgina «Les teves entrades» i pàgina de gràcies */
.lga-tk-pagina { max-width: 760px; margin: 40px auto; padding: 0 16px; }
.lga-tk-entrades__intro { color: #555; }
@media (max-width: 560px) {
	.lga-tk-modal__caixa { padding: 26px 18px 20px; }
}
@media print {
	.lga-tk-entrada { box-shadow: none; }
}

/* --- v0.8 · Botó PDF i pàgina «comanda rebuda» d'entrades --- */
.lga-tk-accions { margin: 0 0 20px; }
a.lga-tk-boto-pdf, a.lga-gr__boto { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 2px solid var(--lga-tk); border-radius: 50px; background: var(--lga-tk); color: #fff !important; font-weight: 700; text-decoration: none !important; line-height: 1.2; transition: background .15s, color .15s; }
a.lga-tk-boto-pdf:hover, a.lga-gr__boto:hover { background: #fff; color: var(--lga-tk) !important; }
a.lga-gr__boto--sec { background: #fff; color: var(--lga-tk) !important; }
a.lga-gr__boto--sec:hover { background: var(--lga-tk); color: #fff !important; }

.lga-gr { max-width: 760px; margin: 0 auto 40px; }
.lga-gr__hero { margin: 0 0 22px; padding: 28px 24px; border-radius: 16px; background: #f4f1ee; text-align: center; }
.lga-gr__hero h2 { margin: 10px 0 8px; font-size: 28px; line-height: 1.2; }
.lga-gr__hero p { margin: 0 auto 6px; max-width: 520px; }
.lga-gr__icona { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #1a7f37; color: #fff; font-size: 34px; font-weight: 800; line-height: 1; }
.lga-gr__hero--error .lga-gr__icona { background: #b3261e; }
.lga-gr__botons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px !important; }
.lga-gr__spinner { width: 48px; height: 48px; margin: 0 auto; border: 5px solid #ddd; border-top-color: var(--lga-tk); border-radius: 50%; animation: lga-gira 0.9s linear infinite; }
@keyframes lga-gira { to { transform: rotate(360deg); } }
a.lga-gr__event { display: flex; gap: 16px; align-items: center; margin: 0 0 20px; padding: 12px; border: 1px solid #e5e0da; border-radius: 14px; color: inherit !important; text-decoration: none !important; }
a.lga-gr__event:hover { border-color: var(--lga-tk); }
.lga-gr__cartell { flex: 0 0 90px; width: 90px !important; height: auto !important; border-radius: 8px; }
.lga-gr__event > span { display: flex; flex-direction: column; gap: 2px; }
.lga-gr__event strong { font-size: 19px; line-height: 1.25; }
.lga-gr__lloc { color: #666; font-size: 14px; }
.lga-gr .lga-tk-entrades__intro { display: none; }
.lga-gr__resum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 24px 0 12px; border: 1px solid #e5e0da; border-radius: 12px; overflow: hidden; }
.lga-gr__resum > div { padding: 12px 14px; border-right: 1px solid #e5e0da; }
.lga-gr__resum > div:last-child { border-right: 0; }
.lga-gr__resum dt { margin: 0; color: #777; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.lga-gr__resum dd { margin: 2px 0 0; font-weight: 700; }
.lga-gr__ajuda { color: #555; font-size: 15px; }
/* Amaga el que WooCommerce posa abans de la plantilla a la pàgina de gràcies */
.lga-tk-gracies-pagina .woocommerce-notice--success.woocommerce-thankyou-order-received { display: none; }
@media (max-width: 600px) {
	.lga-gr__hero h2 { font-size: 23px; }
	.lga-gr__resum > div { border-right: 0; border-bottom: 1px solid #e5e0da; }
	.lga-gr__resum > div:last-child { border-bottom: 0; }
}
@media print {
	.lga-gr__botons, .lga-gr__ajuda, .lga-tk-accions { display: none; }
}

/* --- v0.8 · Entrada amb aspecte d'entrada --- */
.lga-tk-entrada { position: relative; margin: 0 0 22px; border: 1px solid #d9d4ce; border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); break-inside: avoid; }
.lga-tk-entrada--inactiva { opacity: .6; filter: grayscale(1); }
.lga-tk-entrada__cap { display: flex; gap: 20px; padding: 18px; }
.lga-tk-entrada__cartell { flex: 0 0 140px; width: 140px !important; height: auto !important; max-height: 220px; object-fit: cover; border-radius: 8px; align-self: flex-start; }
.lga-tk-entrada__info { min-width: 0; }
.lga-tk-entrada__tipus { margin: 0 0 4px; color: var(--lga-tk); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .03em; }
.lga-tk-entrada__info h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.2; }
.lga-tk-entrada__info h3 a { color: inherit; text-decoration: none; }
.lga-tk-entrada__info dl { margin: 0; }
.lga-tk-entrada__info dl div { margin: 0 0 8px; }
.lga-tk-entrada__info dt, .lga-tk-entrada__et { margin: 0; color: #8a8580; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lga-tk-entrada__info dd { margin: 1px 0 0; font-size: 16px; }
.lga-tk-entrada__matriu { position: relative; display: flex; gap: 22px; align-items: center; padding: 20px 18px; border-top: 2px dashed #cfc8c0; }
.lga-tk-entrada__matriu::before, .lga-tk-entrada__matriu::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--lga-tk-fons, #fff); border: 1px solid #d9d4ce; }
.lga-tk-entrada__matriu::before { left: -12px; }
.lga-tk-entrada__matriu::after { right: -12px; }
.lga-tk-entrada__qr { flex: 0 0 180px; text-align: center; }
.lga-tk-entrada__qr svg { display: block; width: 180px; height: 180px; }
.lga-tk-entrada__qr code { font-size: 14px; font-weight: 700; letter-spacing: 1px; background: none; }
.lga-tk-entrada__dades p { margin: 0 0 4px; }
.lga-tk-entrada__nom { font-size: 20px; font-weight: 700; line-height: 1.2; }
.lga-tk-entrada__n { color: #666; font-size: 14px; margin-top: 8px !important; }
.lga-tk-entrada__estat { font-weight: 700; color: #b32d2e; }
.lga-tk-entrada__banda { display: flex; justify-content: space-between; gap: 10px; padding: 8px 18px; background: var(--lga-tk); color: #fff; font-size: 13px; font-weight: 700; }
@media (max-width: 600px) {
	.lga-tk-entrada__cap { flex-direction: column; align-items: center; text-align: center; }
	.lga-tk-entrada__cartell { flex-basis: auto; width: 160px !important; align-self: center; }
	.lga-tk-entrada__matriu { flex-direction: column; text-align: center; }
	.lga-tk-entrada__qr { flex-basis: auto; }
	.lga-tk-entrada__qr svg { margin: 0 auto; }
}

/* Entrades de soci: comprovació del DNI (0.9.11) */
.lga-tk-soci-estat{margin:-6px 0 10px;font-size:.92em;min-height:0}
.lga-tk-soci-estat:empty{display:none}
.lga-tk-soci-estat.is-ok{color:#2e7d32;font-weight:600}
.lga-tk-nomsoci[hidden]{display:none!important}
.lga-tk-sensedni{margin:0 0 6px;font-size:.88em}
.lga-tk-sensedni[hidden]{display:none}
