/* ============================================================
   Public Registration Form — Estilos del formulario público
   Usa --pr-primary como variable de color primario (sobreescrita
   por el PrimaryColor del formulario en _PublicLayout.cshtml).
   ============================================================ */

:root {
    --pr-primary: #2563eb;
    --pr-primary-hover: #1d4ed8;
    --pr-primary-light: rgba(37, 99, 235, 0.08);
    --pr-border: #e5e7eb;
    --pr-radius: 12px;
    --pr-card-shadow: 0 4px 24px rgba(0,0,0,0.13);
    --pr-text: #111827;
    --pr-text-muted: #6b7280;
    --pr-bg: #1e2433;
}

/* ── Layout ──────────────────────────────────────────────── */

.pr-body {
    min-height: 100vh;
    background-color: var(--pr-bg-color, var(--pr-bg));
    background-image: var(--pr-bg-image, radial-gradient(ellipse at 60% 40%, rgba(37,99,235,0.18) 0%, transparent 70%));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--pr-text);
    margin: 0;
    padding: 0;
}

.pr-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.pr-page-wrapper main {
    flex: 1;
    padding: 2.5rem 1rem;
}

.pr-container {
    max-width: var(--pr-container-max-width, 680px);
    margin: 0 auto;
}

/* ── Card ────────────────────────────────────────────────── */

.pr-card {
    background: #fff;
    border-radius: var(--pr-radius);
    box-shadow: var(--pr-card-shadow);
    overflow: hidden;
}

.pr-card-body {
    padding: 2rem 2.25rem 2.5rem;
}

/* ── Hero image ──────────────────────────────────────────── */

.pr-hero {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #1e2433;
}

.pr-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.55) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem 2.25rem;
}

.pr-hero-title {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ── Step indicator ──────────────────────────────────────── */

.pr-steps {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 0;
}

.pr-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pr-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--pr-border);
    background: #fff;
    color: var(--pr-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pr-step.active .pr-step-circle {
    background: var(--pr-primary);
    border-color: var(--pr-primary);
    color: #fff;
}

.pr-step.completed .pr-step-circle {
    background: var(--pr-primary);
    border-color: var(--pr-primary);
    color: #fff;
}

.pr-step-label {
    font-size: 0.82rem;
    color: var(--pr-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.pr-step.active .pr-step-label {
    color: var(--pr-primary);
    font-weight: 700;
}

.pr-step.completed .pr-step-label {
    color: var(--pr-primary);
}

.pr-step-line {
    flex: 1;
    height: 2px;
    background: var(--pr-border);
    margin: 0 0.4rem;
    min-width: 20px;
}

.pr-step-line.completed {
    background: var(--pr-primary);
}

/* ── Section title ───────────────────────────────────────── */

.pr-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pr-text);
    margin-bottom: 1.5rem;
}

.pr-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pr-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.pr-section-label:first-child { margin-top: 0; }

/* ── Form fields ─────────────────────────────────────────── */

.pr-field-wrap {
    margin-bottom: 0;
}

.pr-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pr-text);
    margin-bottom: 0.4rem;
}

.pr-required {
    color: #ef4444;
    margin-left: 2px;
}

.pr-input {
    border: 1.5px solid var(--pr-border);
    border-radius: 8px;
    padding: 0.65rem 0.875rem;
    font-size: 0.9rem;
    color: var(--pr-text);
    background: #fff;
    transition: border-color 0.15s;
    width: 100%;
}

.pr-input:focus {
    outline: none;
    border-color: var(--pr-primary);
    box-shadow: 0 0 0 3px var(--pr-primary-light);
}

.pr-field-error {
    display: block;
    font-size: 0.78rem;
    color: #ef4444;
    margin-top: 0.25rem;
    min-height: 1rem;
}

/* ── HTML block ──────────────────────────────────────────── */

.pr-html-block {
    padding: 0.5rem 0;
    color: var(--pr-text);
}

/* ── Radio cards (para opciones tipo Comprador/Vendedor) ─── */

/* Opciones apiladas, una por fila: en cuadrícula, los textos largos se partían en
   tarjetas angostas de alturas distintas. */
.pr-radio-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pr-radio-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 2px solid var(--pr-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--pr-text);
}

.pr-radio-card input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--pr-primary);
    flex-shrink: 0;
}

.pr-radio-card.selected,
.pr-radio-card:has(input:checked) {
    border-color: var(--pr-primary);
    background: var(--pr-primary-light);
}

.pr-radio-card:hover:not(.selected):not(:has(input:checked)) {
    border-color: var(--pr-primary);
}

/* ── Checkboxes ──────────────────────────────────────────── */

.pr-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.pr-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--pr-primary);
    flex-shrink: 0;
}

/* ── Ticket cards ────────────────────────────────────────── */

.pr-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pr-ticket-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid var(--pr-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.15s;
}

.pr-ticket-card input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--pr-primary);
    flex-shrink: 0;
}

.pr-ticket-card.selected,
.pr-ticket-card:has(input:checked) {
    border-color: var(--pr-primary);
    background: var(--pr-primary-light);
}

.pr-ticket-info {
    flex: 1;
    min-width: 0;
}

.pr-ticket-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--pr-text);
}

.pr-ticket-desc {
    font-size: 0.82rem;
    color: var(--pr-text-muted);
    margin-top: 0.2rem;
    line-height: 1.4;
}

.pr-ticket-price {
    font-weight: 700;
    color: var(--pr-primary);
    font-size: 0.95rem;
    white-space: nowrap;
}

.pr-free-badge {
    background: #d1fae5;
    color: #065f46;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Promo code ──────────────────────────────────────────── */

.pr-promo-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.pr-promo-row .pr-input {
    flex: 1;
}

.pr-promo-feedback {
    font-size: 0.83rem;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pr-promo-feedback.success { color: var(--pr-primary); }
.pr-promo-feedback.error   { color: #ef4444; }

/* ── Order summary ───────────────────────────────────────── */

.pr-summary-box {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--pr-border);
}

.pr-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--pr-text);
    padding: 0.2rem 0;
}

.pr-discount-amount { color: var(--pr-primary); font-weight: 600; }

.pr-total-row {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pr-border);
    font-size: 1rem;
}

.pr-total-amount {
    color: var(--pr-primary);
    font-size: 1.05rem;
}

/* ── Payment method cards ────────────────────────────────── */

.pr-payment-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pr-payment-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 2px solid var(--pr-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}

.pr-payment-card input[type="radio"] { display: none; }

.pr-payment-card.selected,
.pr-payment-card:has(input:checked) {
    border-color: var(--pr-primary);
    background: var(--pr-primary-light);
}

.pr-payment-icon { font-size: 1.1rem; }

/* ── Terms ───────────────────────────────────────────────── */

.pr-terms { margin-top: 1.25rem; }

.pr-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--pr-text-muted);
    line-height: 1.5;
}

.pr-terms-label a {
    color: var(--pr-primary);
    text-decoration: none;
}

/* ── Divider ─────────────────────────────────────────────── */

.pr-divider {
    border-top: 1px solid var(--pr-border);
    margin: 1.5rem 0 0;
}

/* ── Navigation buttons ──────────────────────────────────── */

.pr-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pr-border);
}

.pr-btn-primary {
    background: var(--pr-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pr-btn-primary:hover {
    background: var(--pr-primary-hover);
    color: #fff;
}

.pr-btn-back {
    background: #fff;
    color: var(--pr-text);
    border: 1.5px solid var(--pr-border);
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s;
    text-decoration: none;
}

.pr-btn-back:hover {
    border-color: var(--pr-primary);
    color: var(--pr-primary);
}

.pr-btn-secondary {
    background: #374151;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Confirmation ────────────────────────────────────────── */

.pr-confirmation {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
}

.pr-confirm-icon {
    display: inline-flex;
    margin-bottom: 1.25rem;
}

.pr-confirm-success { color: var(--pr-primary); }
.pr-confirm-pending { color: #f59e0b; }

.pr-confirm-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pr-text);
    margin-bottom: 0.75rem;
}

.pr-confirm-message {
    font-size: 0.92rem;
    color: var(--pr-text-muted);
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto 1.5rem;
}

.pr-confirm-details {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--pr-border);
    text-align: left;
    margin-top: 1.5rem;
    max-width: 360px;
    margin-inline: auto;
}

.pr-confirm-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    padding: 0.3rem 0;
    color: var(--pr-text);
}

.pr-confirm-detail-row span { color: var(--pr-text-muted); }

/* ── Footer ──────────────────────────────────────────────── */

.pr-footer {
    padding: 1.25rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.pr-footer-inner {
    max-width: var(--pr-container-max-width, 680px);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.pr-footer-brand { font-weight: 600; }

.pr-footer-links {
    display: flex;
    gap: 1rem;
}

.pr-footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}

.pr-footer-links a:hover { color: rgba(255,255,255,0.8); }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 576px) {
    .pr-card-body { padding: 1.5rem 1.25rem 2rem; }
    .pr-hero { height: 160px; }
    .pr-hero-title { font-size: 1.35rem; }
    .pr-payment-cards { grid-template-columns: 1fr; }
    .pr-step-label { display: none; }
    .pr-step.active .pr-step-label { display: inline; }
    .pr-footer-inner { flex-direction: column; text-align: center; }
}
