/**
 * Checkout — diseño alineado con ficha de rifa / home (negro, amarillo, Oswald).
 */

body.rifa-checkout-page {
	--rifa-checkout-max: 520px;
	background-color: #000 !important;
}

body.rifa-checkout-page .pageitems,
body.rifa-checkout-page .entry-content,
body.rifa-checkout-page .entry-header {
	max-width: var(--rifa-checkout-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: 16px;
	padding-right: 16px;
	box-sizing: border-box;
}

body.rifa-checkout-page .entry-header .entry-title {
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: clamp(1.5rem, 5vw, 2rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	color: #fff;
	margin: 0 0 0.5rem;
}

body.rifa-checkout-page .entry-header {
	margin-bottom: 0.25rem;
	border: none;
}

/* Contenedor principal */
.rifa-checkout {
	width: 100%;
	max-width: var(--rifa-checkout-max);
	margin: 0 auto;
	padding: 0 0 3rem;
	box-sizing: border-box;
}

.rifa-checkout__hero {
	text-align: center;
	margin: 0 0 0.5rem;
}

.rifa-checkout__hero-tagline {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.72);
}

.rifa-checkout__eyebrow {
	display: block;
	margin: 0 0 0.35rem;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rifa-yellow, #ffb800);
}

.rifa-checkout__section-title {
	margin: 0;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: clamp(1.25rem, 4vw, 1.5rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	line-height: 1.15;
}

.rifa-checkout__section-desc {
	margin: 0.4rem 0 0;
	font-size: 0.875rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.7);
}

.rifa-checkout__section-head {
	margin-bottom: 1rem;
	text-align: center;
}

.rifa-checkout__section {
	margin-bottom: 0.25rem;
}

.rifa-checkout .rifa-separator {
	max-width: 100%;
	margin: 1.75rem auto;
}

/* Tarjetas */
.rifa-checkout__card {
	border: 2px solid rgba(255, 184, 0, 0.35);
	border-radius: 14px;
	background: linear-gradient(165deg, #141414 0%, #0a0a0a 100%);
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.8) inset,
		0 12px 40px rgba(0, 0, 0, 0.55),
		0 0 28px rgba(255, 184, 0, 0.06);
	padding: 1.15rem 1.1rem;
	box-sizing: border-box;
}

/* Login WooCommerce (plugin puede mostrarlo arriba) */
body.rifa-checkout-page .woocommerce-form-login-toggle,
body.rifa-checkout-page .woocommerce-form-login {
	max-width: var(--rifa-checkout-max);
	margin-left: auto;
	margin-right: auto;
}

body.rifa-checkout-page .woocommerce-form-login {
	border: 2px solid rgba(255, 184, 0, 0.35);
	border-radius: 14px;
	background: #141414;
	padding: 1.25rem;
	margin-bottom: 1.5rem;
}

/* Tabla de pedido WooCommerce */
.rifa-checkout__card--order .woocommerce-checkout-review-order-table {
	margin: 0;
	border: none;
	background: transparent !important;
}

.rifa-checkout__card--order .woocommerce-checkout-review-order-table th,
.rifa-checkout__card--order .woocommerce-checkout-review-order-table td {
	border-color: rgba(255, 255, 255, 0.12) !important;
	color: #fff !important;
	padding: 0.65rem 0.5rem;
	font-size: 0.875rem;
}

.rifa-checkout__card--order .woocommerce-checkout-review-order-table thead th {
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65) !important;
	border-bottom: 1px solid rgba(255, 184, 0, 0.25);
}

.rifa-checkout__card--order .order-total th,
.rifa-checkout__card--order .order-total td {
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 1rem;
	font-weight: 700;
	color: var(--rifa-yellow, #ffb800) !important;
	border-top: 2px solid rgba(255, 184, 0, 0.35) !important;
}

.rifa-checkout__card--order .cart_item .product-name .variation {
	display: none;
}

/* Formulario facturación */
.rifa-checkout__card--billing .woocommerce-billing-fields h3 {
	display: none;
}

.rifa-checkout__card--billing .form-row {
	background: transparent !important;
	padding: 0 !important;
	margin-bottom: 0.85rem;
}

.rifa-checkout__card--billing label {
	color: rgba(255, 255, 255, 0.9) !important;
	font-size: 0.8125rem;
	font-weight: 500;
	margin-bottom: 0.35rem;
}

.rifa-checkout__card--billing input.input-text,
.rifa-checkout__card--billing select,
.rifa-checkout__card--billing textarea {
	background-color: rgba(17, 17, 17, 0.95) !important;
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.85) !important;
	border-radius: 10px !important;
	padding: 0.75rem 0.9rem !important;
}

.rifa-checkout__card--billing input:focus,
.rifa-checkout__card--billing select:focus,
.rifa-checkout__card--billing textarea:focus {
	border-color: var(--rifa-yellow, #ffb800) !important;
	box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.25) !important;
}

/* Anular estilos legacy del tema en checkout */
body.rifa-checkout-page .consolidado-tickets {
	background: transparent !important;
	margin-bottom: 0 !important;
	border: none !important;
}

body.rifa-checkout-page .consolidado-item {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
}

body.rifa-checkout-page .consolidado-total {
	background: transparent !important;
	border: none !important;
}

body.rifa-checkout-page .ticket-numbers {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
}

/* Consolidado de tickets */
.rifa-checkout-consolidado {
	width: 100%;
	margin: 0;
	padding: 0;
}

.rifa-checkout-consolidado__head {
	text-align: center;
	margin-bottom: 1.15rem;
}

.rifa-checkout-consolidado__title {
	margin: 0;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: clamp(1.35rem, 4.5vw, 1.65rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	line-height: 1.15;
}

.rifa-checkout-consolidado__subtitle {
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.68);
}

.rifa-checkout-consolidado__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.rifa-checkout-consolidado__item {
	border: 2px solid rgba(255, 184, 0, 0.45);
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.55);
	box-shadow: 0 0 18px rgba(255, 184, 0, 0.08);
	padding: 1rem 1rem 1.1rem;
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.rifa-checkout-consolidado__item:hover {
	border-color: var(--rifa-yellow, #ffb800);
	box-shadow: 0 0 24px rgba(255, 184, 0, 0.14);
}

.rifa-checkout-consolidado__item-top {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
}

.rifa-checkout-consolidado__icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 10px;
	border: 2px solid var(--rifa-yellow, #ffb800);
	background: rgba(255, 184, 0, 0.1);
	color: var(--rifa-yellow, #ffb800);
	font-size: 1.15rem;
}

.rifa-checkout-consolidado__product {
	margin: 0;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
	line-height: 1.2;
}

.rifa-checkout-consolidado__qty {
	margin: 0.2rem 0 0;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.65);
}

.rifa-checkout-consolidado__numbers-label {
	margin: 0 0 0.55rem;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
}

.rifa-checkout-consolidado__numbers-label strong {
	font-weight: 600;
}

.rifa-checkout-consolidado__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	justify-content: center;
}

/* Chips de número — estilo números afortunados */
.rifa-ticket-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	padding: 0.35rem 0.55rem;
	border: 1px solid rgba(255, 184, 0, 0.5);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.65);
	line-height: 1;
}

.rifa-ticket-chip__halo {
	position: absolute;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 1rem;
	font-weight: 700;
	color: var(--rifa-yellow, #ffb800);
	filter: blur(5px);
	opacity: 0.45;
	pointer-events: none;
	user-select: none;
}

.rifa-ticket-chip__value {
	position: relative;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	background: linear-gradient(180deg, #ffe566 0%, #ffb800 50%, #e6a000 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	filter: drop-shadow(0 0 6px rgba(255, 184, 0, 0.45));
}

.rifa-checkout-consolidado__notice {
	margin: 0;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.55);
	text-align: center;
}

.rifa-checkout-consolidado__empty {
	text-align: center;
	padding: 2rem 1rem;
	border: 2px dashed rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	color: rgba(255, 255, 255, 0.6);
}

.rifa-checkout-consolidado__empty i {
	display: block;
	font-size: 2rem;
	margin-bottom: 0.5rem;
	opacity: 0.7;
}

/* Footer totales */
.rifa-checkout-consolidado__footer.consolidado-total {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-top: 1.15rem;
	padding: 0;
	border: none;
	background: transparent !important;
}

.rifa-checkout-consolidado__stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	padding: 1rem 0.75rem;
	border: 2px solid rgba(255, 184, 0, 0.35);
	border-radius: 12px;
	background: #000;
	text-align: center;
}

.rifa-checkout-consolidado__stat--pay {
	border-color: var(--rifa-yellow, #ffb800);
	box-shadow: 0 0 22px rgba(255, 184, 0, 0.2);
}

.rifa-checkout-consolidado__stat-label {
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

.rifa-checkout-consolidado__stat-value {
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: clamp(1.5rem, 5vw, 1.85rem);
	font-weight: 700;
	line-height: 1;
	color: #fff;
}

.rifa-checkout-consolidado__stat-value--accent {
	color: var(--rifa-yellow, #ffb800);
	text-shadow: 0 0 20px rgba(255, 184, 0, 0.35);
}

.rifa-checkout-consolidado__stat-value .woocommerce-Price-amount,
.rifa-checkout-consolidado__stat-value bdi {
	color: inherit;
}

/* Pago — WooCommerce + plugin comprobante */
.rifa-checkout__card--payment #payment {
	background: transparent !important;
}

.rifa-checkout__card--payment #payment ul.payment_methods {
	padding: 0 !important;
	margin: 0 0 1rem !important;
	background: transparent !important;
	border: none !important;
}

.rifa-checkout__card--payment #payment ul.payment_methods li {
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	margin-bottom: 0.5rem;
	padding: 0.75rem 0.9rem !important;
	background: rgba(0, 0, 0, 0.4) !important;
}

.rifa-checkout__card--payment #payment ul.payment_methods li label {
	color: #fff !important;
	font-weight: 500;
	cursor: pointer;
}

.rifa-checkout__card--payment #payment div.payment_box {
	background: rgba(255, 255, 255, 0.06) !important;
	color: rgba(255, 255, 255, 0.88) !important;
	border-radius: 8px;
	margin-top: 0.5rem;
}

.rifa-checkout__card--payment #payment div.payment_box::before {
	border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

/* Plugin digital-lottery — comprobante de pago */
body.rifa-checkout-page #proof-bank-payment {
	margin: 1rem 0 0 !important;
	padding: 1rem !important;
	border: 2px dashed rgba(255, 184, 0, 0.45) !important;
	border-radius: 12px !important;
	background: rgba(0, 0, 0, 0.45) !important;
}

body.rifa-checkout-page #proof-bank-payment label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff !important;
	cursor: pointer;
}

body.rifa-checkout-page #proof-bank-payment label a {
	color: inherit;
	text-decoration: none;
}

body.rifa-checkout-page #proof_bank_payment_file {
	width: 100%;
	margin-top: 0.65rem;
	padding: 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.5) !important;
	border-radius: 8px;
	background: #111 !important;
	color: #fff !important;
	font-size: 0.8125rem;
}

body.rifa-checkout-page #proof_bank_payment_filelist {
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	color: var(--rifa-yellow, #ffb800);
}

body.rifa-checkout-page .proof-upload-inline-error {
	color: #ff6b6b !important;
	font-size: 0.8125rem;
	margin-top: 0.5rem;
}

/* Botón finalizar pedido */
body.rifa-checkout-page #payment #place_order,
body.rifa-checkout-page .woocommerce #payment #place_order {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	margin-top: 0.5rem !important;
	padding: 1rem 1.25rem !important;
	border: 2px solid var(--rifa-yellow, #ffb800) !important;
	border-radius: 10px !important;
	background: var(--rifa-yellow, #ffb800) !important;
	color: #000 !important;
	font-family: var(--rifa-font-title, 'Oswald', sans-serif) !important;
	font-size: 1.0625rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase !important;
	box-shadow: 0 4px 24px rgba(255, 184, 0, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.rifa-checkout-page #payment #place_order:hover,
body.rifa-checkout-page .woocommerce #payment #place_order:hover {
	background: #ffcc4d !important;
	border-color: #ffcc4d !important;
	color: #000 !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 28px rgba(255, 184, 0, 0.45);
}

/* Avisos WooCommerce */
body.rifa-checkout-page .woocommerce-message,
body.rifa-checkout-page .woocommerce-info,
body.rifa-checkout-page .woocommerce-error {
	max-width: var(--rifa-checkout-max);
	margin-left: auto;
	margin-right: auto;
	border-radius: 10px;
}

/* Layout legacy */
body.rifa-checkout-page .finalizarcompra,
body.rifa-checkout-page .checkout-details {
	display: block;
	width: 100%;
	max-width: 100%;
}

body.rifa-checkout-page .col2-set {
	display: flex;
	flex-direction: column;
	gap: 0;
}

body.rifa-checkout-page .col2-set .col-1,
body.rifa-checkout-page .col2-set .col-2 {
	width: 100%;
	float: none;
	margin: 0;
}

body.rifa-checkout-page .woocommerce-additional-fields {
	display: none;
}

body.rifa-checkout-page #order_review_heading {
	display: none !important;
}

body.rifa-checkout-page .select2-container--default .select2-selection--single {
	background-color: rgba(17, 17, 17, 0.95) !important;
	border: 1px solid rgba(255, 255, 255, 0.85) !important;
	border-radius: 10px !important;
	min-height: 46px;
}

body.rifa-checkout-page .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: #fff !important;
	line-height: 44px !important;
	padding-left: 0.9rem;
}

body.rifa-checkout-page .select2-dropdown {
	background: #141414 !important;
	border-color: rgba(255, 184, 0, 0.45) !important;
}

body.rifa-checkout-page .select2-results__option--highlighted[aria-selected],
body.rifa-checkout-page .select2-results__option[aria-selected='true'] {
	background: rgba(255, 184, 0, 0.2) !important;
	color: #fff !important;
}

@media (max-width: 480px) {
	.rifa-checkout-consolidado__footer.consolidado-total {
		grid-template-columns: 1fr;
	}

	.rifa-checkout-consolidado__item-top {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.rifa-checkout-page #payment #place_order:hover {
		transform: none;
	}
}
