/* Velorun Core — frontend styles (Fase H.4) */

.velorun-core,
.velorun-core .vr-registration,
.velorun-core .vr-public-entries,
.velorun-core .vr-registration-state,
.velorun-core .vr-already-registered,
.velorun-core .vr-event-summary {
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: inherit;
}

.velorun-core h1,
.velorun-core h2,
.velorun-core h3,
.velorun-core h4 {
	font-family: inherit;
	font-weight: 700;
	line-height: 1.25;
	margin-top: 0;
}

.velorun-core .vr-registration__title,
.velorun-core .vr-flow > .vr-section-title {
	font-size: clamp(1.625rem, 2.2vw, 2.375rem);
	line-height: 1.2;
}

.velorun-core .vr-section-title,
.velorun-core .vr-public-entries__title {
	font-size: clamp(1.375rem, 1.8vw, 1.625rem);
	line-height: 1.25;
	color: #1c4027;
}

.velorun-core .vr-option-group__title,
.velorun-core .vr-summary-card__title,
.velorun-core .vr-profile-panel__title {
	font-size: clamp(1.125rem, 1.4vw, 1.375rem);
	line-height: 1.3;
}

.velorun-core p,
.velorun-core .vr-notice,
.velorun-core .vr-summary-card__meta,
.velorun-core .vr-option-card__meta {
	font-size: clamp(0.9375rem, 1vw, 1.0625rem);
	line-height: 1.55;
}

.velorun-core .vr-table,
.velorun-core .vr-table th,
.velorun-core .vr-table td {
	font-size: 0.875rem;
	line-height: 1.45;
}

.vr-btn {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	border-radius: 4px;
	border: 1px solid transparent;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.3;
}

.vr-btn--primary {
	background: #1c4027;
	color: #fff;
}

.vr-btn--primary:hover,
.vr-btn--primary:focus {
	background: #2a5c3a;
	color: #fff;
}

.vr-btn--secondary {
	background: #33cc33;
	color: #1c4027;
}

.vr-btn--secondary:hover,
.vr-btn--secondary:focus {
	background: #2eb82e;
	color: #1c4027;
}

.vr-btn--ghost {
	background: transparent;
	border-color: #1c4027;
	color: #1c4027;
}

.vr-btn[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.vr-event-actions__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1rem 0;
}

.vr-notice {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin: 1rem 0;
}

.vr-notice--warning {
	background: #fff8e6;
	border: 1px solid #f0d78c;
}

.vr-notice--success {
	background: #edf9ef;
	border: 1px solid #9fd9a8;
}

.vr-notice--info {
	background: #eef6ff;
	border: 1px solid #b8d4f0;
}

.vr-form .vr-field {
	margin-bottom: 1rem;
}

.vr-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.vr-form input[type="text"],
.vr-form input[type="url"],
.vr-form input[type="email"],
.vr-form select {
	width: 100%;
	max-width: 28rem;
	padding: 0.5rem 0.65rem;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.vr-optional {
	font-weight: 400;
	color: #666;
}

.vr-readonly {
	display: block;
	color: #444;
}

.vr-fieldset {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 1rem;
	margin: 1rem 0;
}

.vr-radio {
	display: block;
	margin: 0.5rem 0;
	cursor: pointer;
}

.vr-radio input {
	margin-right: 0.5rem;
}

.vr-athlete-summary ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.vr-athlete-summary li {
	margin: 0.35rem 0;
}

.vr-modal[hidden] {
	display: none !important;
}

.vr-modal:not([hidden]) {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vr-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.vr-modal__dialog {
	position: relative;
	background: #fff;
	padding: 1.5rem;
	border-radius: 6px;
	max-width: 420px;
	width: calc(100% - 2rem);
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.vr-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	line-height: 1;
}

.vr-modal__register-link {
	margin-top: 1rem;
	text-align: center;
}

.vr-table-wrap {
	overflow-x: auto;
}

.vr-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.vr-table th,
.vr-table td {
	border: 1px solid #ddd;
	padding: 0.5rem 0.75rem;
	text-align: left;
}

.vr-table th {
	background: #f5f5f5;
}

.vr-status--confirmed {
	color: #1c4027;
	font-weight: 600;
}

.vr-status--pending {
	color: #996600;
	font-weight: 600;
}

.vr-validation-result {
	margin-top: 1.5rem;
	padding: 1rem;
	border-radius: 4px;
}

.vr-validation-result--ok {
	background: #edf9ef;
	border: 1px solid #9fd9a8;
}

.vr-validation-result--error {
	background: #fdeeee;
	border: 1px solid #e8a8a8;
}

.vr-categories-list label {
	display: block;
	margin: 0.5rem 0;
}

/* H.2 — seções e layout da inscrição */
.vr-page-section {
	border: 1px solid #e2e8e4;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin: 1.5rem 0;
	background: #fafcfa;
}

.vr-section-title {
	margin: 0 0 1rem;
	color: #1c4027;
}

.vr-page-section--profile {
	background: #fff;
}

.vr-page-section--registration {
	background: #f4faf5;
}

.vr-athlete-summary--compact {
	background: #fff;
	border: 1px solid #dce8df;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}

.vr-athlete-summary__title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	color: #1c4027;
}

.vr-athlete-summary__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.5rem 1rem;
	font-size: 0.95rem;
}

.vr-fieldset legend {
	font-weight: 700;
	color: #1c4027;
	padding: 0 0.25rem;
}

.vr-actions--continue,
.vr-actions--review {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-top: 1.25rem;
}

.vr-btn--lg {
	padding: 0.85rem 1.5rem;
	font-size: 1rem;
}

.vr-review-card {
	background: #fff;
	border: 2px solid #1c4027;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
}

.vr-review-card__title {
	margin: 0 0 1rem;
	color: #1c4027;
}

.vr-review-list {
	margin: 0;
}

.vr-review-list__row {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 0.5rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid #eef2ef;
}

.vr-review-list__row dt {
	font-weight: 600;
	margin: 0;
}

.vr-review-list__row dd {
	margin: 0;
}

.vr-form input[type="date"] {
	max-width: 16rem;
}

/* Woo cart/checkout — contraste quantidade (somente páginas carrinho/checkout) */
.woocommerce-cart input.qty,
.woocommerce-checkout input.qty,
.woocommerce-cart .quantity input,
.woocommerce-checkout .quantity input,
.wc-block-components-quantity-selector input {
	color: #111 !important;
	background: #fff !important;
	border: 1px solid #999 !important;
}

.vr-qty-fixed {
	display: inline-block;
	min-width: 1.5rem;
	text-align: center;
	font-weight: 700;
	color: #111;
	background: #fff;
	border: 1px solid #999;
	border-radius: 4px;
	padding: 0.25rem 0.5rem;
}

/* H.3 — fluxo em duas colunas */
.vr-flow__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
	gap: 1.5rem;
	align-items: start;
}

.vr-flow__main {
	min-width: 0;
}

.vr-flow__sidebar {
	min-width: 0;
}

.vr-summary-card {
	background: #fff;
	border: 2px solid #1c4027;
	border-radius: 10px;
	padding: 1.25rem;
}

.vr-summary-card--sticky {
	position: sticky;
	top: 1.5rem;
}

.vr-summary-card__title {
	margin: 0 0 0.35rem;
	color: #1c4027;
}

.vr-summary-card__meta {
	margin: 0.15rem 0;
	color: #333;
	font-size: 0.92rem;
}

.vr-summary-list {
	margin: 1rem 0;
}

.vr-summary-list > div {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 0.35rem 0.75rem;
	padding: 0.35rem 0;
	border-bottom: 1px solid #eef2ef;
}

.vr-summary-list dt {
	font-weight: 600;
	color: #1c4027;
	margin: 0;
}

.vr-summary-list dd {
	margin: 0;
	color: #111;
}

.vr-btn--block {
	display: block;
	width: 100%;
	text-align: center;
}

.vr-profile-panel {
	background: #fff;
	border: 1px solid #dce8df;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.25rem;
}

.vr-profile-panel__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.vr-profile-panel__title {
	margin: 0;
	font-size: 1rem;
	color: #1c4027;
}

.vr-link-btn {
	background: none;
	border: none;
	color: #1c4027;
	text-decoration: underline;
	cursor: pointer;
	font-weight: 600;
	padding: 0;
}

.vr-profile-compact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.5rem 1rem;
	margin: 0;
}

.vr-profile-compact > div {
	margin: 0;
}

.vr-profile-compact dt {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #666;
	margin: 0 0 0.15rem;
}

.vr-profile-compact dd {
	margin: 0;
	color: #111;
	font-weight: 600;
}

/* H.4 — card de estado da inscrição */
.vr-registration-state {
	max-width: 42rem;
	margin: 1rem 0 1.5rem;
}

.vr-state-card {
	background: #fff;
	border: 1px solid #d8e3dc;
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 1px 4px rgba(28, 64, 39, 0.06);
}

.vr-state-card__title {
	margin: 0 0 0.35rem;
	color: #1c4027;
	font-size: clamp(1.5rem, 2vw, 2rem);
	line-height: 1.2;
	font-weight: 700;
	text-transform: none;
	letter-spacing: normal;
}

.vr-state-card__event {
	margin: 0 0 0.5rem;
	color: #333;
	font-size: clamp(1rem, 1.2vw, 1.125rem);
	font-weight: 600;
}

.vr-state-card__message {
	margin: 0 0 0.75rem;
	color: #444;
	font-size: clamp(0.9375rem, 1vw, 1rem);
}

.vr-state-card__status {
	margin: 0 0 1rem;
	font-size: clamp(0.9375rem, 1vw, 1rem);
}

.vr-state-card__status-label {
	font-weight: 600;
	color: #1c4027;
	margin-right: 0.35rem;
}

.vr-status-pill {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
}

.vr-status-pill--in_cart {
	background: #eef6ff;
	color: #1a4d8f;
}

.vr-status-pill--pending_payment {
	background: #fff4e0;
	color: #8a5a00;
}

.vr-status-pill--confirmed {
	background: #e8f5ea;
	color: #1c4027;
}

.vr-status-pill--failed_or_cancelled {
	background: #f5f5f5;
	color: #666;
}

.vr-state-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
}

.vr-inline-form {
	display: inline;
	margin: 0;
}

.vr-existing-registration {
	background: #fff;
	border: 1px solid #d8e3dc;
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
}

.vr-status--confirmed {
	color: #1c6b2e;
}

.vr-status--pending {
	color: #b36b00;
}

.vr-option-group {
	border: none;
	margin: 0 0 1.25rem;
	padding: 0;
}

.vr-option-group__title {
	font-weight: 700;
	color: #1c4027;
	margin-bottom: 0.75rem;
}

.vr-option-list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.vr-option-card {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.85rem;
	align-items: center;
	padding: 0.9rem 1rem;
	border: 2px solid #c5d4c9;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.vr-option-card:hover {
	border-color: #33cc33;
	box-shadow: 0 2px 8px rgba(28, 64, 39, 0.08);
}

.vr-option-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.vr-option-card__indicator {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid #1c4027;
	background: #fff;
	flex-shrink: 0;
	box-shadow: inset 0 0 0 0 #33cc33;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.vr-option-card:has(input:checked) {
	border-color: #33cc33;
	background: #f4fff4;
}

.vr-option-card:has(input:checked) .vr-option-card__indicator {
	border-color: #1c4027;
	box-shadow: inset 0 0 0 6px #33cc33;
}

.vr-option-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.vr-option-card__title {
	color: #111;
	font-size: 1rem;
}

.vr-option-card__meta {
	color: #555;
	font-size: 0.9rem;
}

/* H.4 — lista pública de inscritos */
.vr-public-entries__title {
	margin: 0 0 1rem;
}

.vr-public-entries__table-wrap {
	margin: 0.5rem 0 1rem;
	-webkit-overflow-scrolling: touch;
}

.vr-public-entries__table {
	min-width: 640px;
	border: 1px solid #e2e8e4;
}

.vr-public-entries__table th {
	background: #f7faf8;
	font-weight: 600;
	color: #1c4027;
	border-color: #e2e8e4;
}

.vr-public-entries__table td {
	border-color: #eef2ef;
}

.vr-public-entries__table tbody tr:nth-child(even) {
	background: #fafcfa;
}

.vr-public-entries .vr-status--confirmed {
	color: #1c6b2e;
	background: #e8f5ea;
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
}

.vr-public-entries .vr-status--pending {
	color: #9a5b00;
	background: #fff4e0;
	padding: 0.15rem 0.5rem;
	border-radius: 4px;
}

/* H.6 — produto ticket Woo (escopo body.vr-ticket-product-page) */
body.vr-ticket-product-page .woocommerce-product-gallery,
body.vr-ticket-product-page .woocommerce-tabs,
body.vr-ticket-product-page .related.products,
body.vr-ticket-product-page .upsells.products,
body.vr-ticket-product-page .woocommerce-product-rating,
body.vr-ticket-product-page .product_meta {
	display: none !important;
}

body.vr-ticket-product-page .summary.entry-summary {
	width: 100%;
	max-width: 42rem;
	margin: 0 auto;
	float: none;
}

body.vr-ticket-product-page div.product {
	display: block;
}

body.vr-ticket-product-page .vr-ticket-product-card,
body.vr-ticket-product-page .vr-registration-state {
	margin: 1.5rem auto;
}

@media (max-width: 900px) {
	.vr-flow__grid {
		grid-template-columns: 1fr;
	}

	.vr-summary-card--sticky {
		position: static;
	}

	.vr-state-card__title {
		font-size: clamp(1.375rem, 5vw, 1.75rem);
	}
}
