/**
 * ingressos-publico.css
 *
 * Dedicated stylesheet for the public ticket catalog (/ingressos).
 * LIGHT theme — only navbar/footer are dark on this site.
 * Page bg #ffffff, body text #3f0201, gold accent #cd9542.
 */

/* ─── Custom Properties ─────────────────────────────────────────────────── */
:root {
    --pt-gold:       #cd9542;
    --pt-gold-dim:   #b8a258;
    --pt-copper:     #cd9542;
    --pt-bg:         #ffffff;
    --pt-bg-card:    #ffffff;
    --pt-bg-raised:  #f9fafb;
    --pt-border:     #e5e7eb;
    --pt-text:       #3f0201;
    --pt-text-muted: #6b7280;
    --pt-radius:     14px;
    --pt-radius-sm:  8px;
    --pt-shadow:     0 4px 24px rgba(0, 0, 0, .08);
}

/* ─── Hero section ──────────────────────────────────────────────────────── */
.pt-hero {
    background: linear-gradient(160deg, #ffffff 0%, #fafaf7 50%, #fff8e8 100%);
    border-bottom: 1px solid var(--pt-border);
    position: relative;
    overflow: hidden;
}

.pt-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 70% 50%, rgba(222, 194, 106, .12) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 10% 90%, rgba(234, 101, 36, .05) 0%, transparent 70%);
    pointer-events: none;
}

.pt-hero--minimal {
    padding-bottom: 1rem;
}

.pt-batch-badge {
    background: rgba(222, 194, 106, .15);
    border: 1px solid rgba(222, 194, 106, .35);
    border-radius: var(--pt-radius-sm);
    padding: .5rem .875rem;
    text-align: right;
    white-space: nowrap;
}

/* ─── Stepper ───────────────────────────────────────────────────────────── */
.pt-stepper ol {
    padding: 0;
    margin: 0;
    list-style: none;
}

.pt-stepper__circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    transition: background .3s, border-color .3s, box-shadow .3s;
    border: 2px solid transparent;
}

.pt-stepper__circle--active {
    background: var(--pt-gold);
    color: #191919;
    box-shadow: 0 0 0 4px rgba(222, 194, 106, .25);
}

.pt-stepper__circle--done {
    background: rgba(222, 194, 106, .15);
    border-color: var(--pt-gold-dim);
    color: var(--pt-gold);
}

.pt-stepper__circle--pending {
    background: var(--pt-bg-raised);
    border-color: var(--pt-border);
    color: var(--pt-text-muted);
}

.pt-stepper__label {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    text-align: center;
    max-width: 56px;
    line-height: 1.3;
}

.pt-stepper__label--active  { color: var(--pt-gold); font-weight: 700; }
.pt-stepper__label--done    { color: var(--pt-text-muted); }
.pt-stepper__label--pending { color: var(--pt-text-muted); opacity: .5; }

/* Connector line — aligns with the 32px circle's vertical center (16px) */
.pt-stepper__line-wrapper {
    display: flex;
    align-items: center;
    align-self: flex-start;
    height: 32px;
    margin: 0 4px;
}

.pt-stepper__line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--pt-border);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.pt-stepper__line--filled {
    background: var(--pt-gold-dim);
}

.pt-stepper__line--filled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--pt-gold);
    animation: pt-line-fill .5s ease forwards;
}

@keyframes pt-line-fill {
    from { transform: scaleX(0); transform-origin: left; }
    to   { transform: scaleX(1); }
}

/* ─── Ticket type cards ─────────────────────────────────────────────────── */
.pt-card {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: var(--pt-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: border-color .2s, box-shadow .2s;
}

.pt-card:hover:not(.pt-card--sold-out) {
    border-color: rgba(199, 121, 22, .35);
    box-shadow: 0 4px 16px rgba(199, 121, 22, .08);
}

.pt-card--sold-out {
    opacity: .55;
    cursor: not-allowed;
}

.pt-card__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
}

.pt-card__info {
    flex: 1;
    min-width: 0;
}

.pt-card__name {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--pt-text);
    margin: 0 0 .375rem;
    line-height: 1.35;
}

.pt-card__desc {
    font-size: .8125rem;
    color: var(--pt-text-muted);
    margin: .375rem 0 0;
    line-height: 1.5;
}

.pt-card__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .75rem;
    flex-shrink: 0;
}

.pt-card__price {
    font-size: 1.0625rem;
    font-weight: 800;
    color: #681919;
    white-space: nowrap;
    margin: 0;
}

/* ─── Qty Spinner ───────────────────────────────────────────────────────── */
.pt-spinner {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
}

.pt-spinner--disabled {
    pointer-events: none;
    opacity: .4;
}

.pt-spinner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.pt-spinner__btn:hover:not([disabled]) {
    background: rgba(205, 149, 66, .2);
    color: #681919;
}

.pt-spinner__btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.pt-spinner__input {
    width: 36px;
    text-align: center;
    background: transparent;
    border: none;
    outline: none;
    color: var(--pt-text);
    font-size: .875rem;
    font-weight: 700;
    padding: 0;
    -moz-appearance: textfield;
}

.pt-spinner__input::-webkit-outer-spin-button,
.pt-spinner__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ─── Badges ────────────────────────────────────────────────────────────── */
.pt-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

.pt-badge--sold-out {
    background: rgba(239, 68, 68, .1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, .25);
}

.pt-badge--low-stock {
    background: rgba(245, 158, 11, .12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, .3);
}

.pt-badge--doc {
    background: rgba(59, 130, 246, .1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, .25);
}

/* ─── Order Summary ─────────────────────────────────────────────────────── */
.pt-summary {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: var(--pt-radius);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    padding: 1.25rem;
}

/* Desktop sticky sidebar */
.pt-summary--sticky {
    position: sticky;
    top: 88px; /* below fixed header */
}

/* Mobile bottom bar */
.pt-summary--mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    border-radius: var(--pt-radius) var(--pt-radius) 0 0;
    border-bottom: none;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .12);
    padding: 1rem 1rem env(safe-area-inset-bottom, 0.5rem);
    /* collapsed when nothing selected */
    transform: translateY(calc(100% - 64px));
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.pt-summary--mobile.is-active {
    transform: translateY(0);
}

.pt-summary__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .875rem;
}

.pt-summary__title {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--pt-text);
    margin: 0;
}

.pt-summary__items {
    list-style: none;
    margin: 0 0 .875rem;
    padding: 0;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    gap: .375rem;
}

.pt-summary__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .8125rem;
    color: var(--pt-text-muted);
    gap: .5rem;
}

.pt-summary__item-name {
    truncate: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.pt-summary__item-price {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--pt-text);
}

.pt-summary__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    text-align: center;
}

.pt-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: .75rem;
    border-top: 1px solid var(--pt-border);
    margin-bottom: 1rem;
    font-size: .875rem;
    color: var(--pt-text-muted);
}

.pt-summary__total-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #681919;
}

.pt-summary__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .75rem 1.25rem;
    border-radius: 999px;
    background: var(--pt-gold);
    color: #3f0201;
    font-weight: 700;
    font-size: .9375rem;
    border: none;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
}

.pt-summary__cta:hover:not([disabled]) {
    opacity: .9;
    transform: translateY(-1px);
}

.pt-summary__cta[disabled] {
    opacity: .35;
    cursor: not-allowed;
    transform: none;
}

/* ─── Empty state ────────────────────────────────────────────────────────── */
.pt-empty-state {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--pt-radius);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
}

.pt-empty-state__icon {
    width: 64px;
    height: 64px;
    background: rgba(205, 149, 66, .12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

/* ─── Mobile body padding to prevent content hiding behind summary bar ─── */
@media (max-width: 1023px) {
    body.has-pt-summary {
        padding-bottom: 80px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED FORM STYLES — used by portadores (step 2) and identificacao (step 3)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Field label ────────────────────────────────────────────────────────── */
.pt-field__label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--pt-text-muted, #a8a099);
    margin-bottom: .375rem;
    letter-spacing: .02em;
}

/* ─── Field input ────────────────────────────────────────────────────────── */
.pt-field__input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--pt-border, #e5e7eb);
    border-radius: 8px;
    padding: .625rem .875rem;
    color: var(--pt-text, #191919);
    font-size: .875rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}

.pt-field__input::placeholder {
    color: var(--pt-text-muted, #9ca3af);
    opacity: .8;
}

.pt-field__input:focus {
    border-color: var(--pt-gold, #cd9542);
    box-shadow: 0 0 0 3px rgba(205, 149, 66, .12);
}

.pt-field__input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

/* ─── Field error message ────────────────────────────────────────────────── */
.pt-field__error {
    display: none;
    font-size: .7rem;
    color: #b91c1c;
    margin-top: .3rem;
}

.pt-field__input.is-invalid ~ .pt-field__error,
.pt-field__input.is-invalid + .pt-field__error {
    display: block;
}

/* ─── Half-price / document warning banner ───────────────────────────────── */
.pt-half-warning {
    background: rgba(245, 158, 11, .1);
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 8px;
    padding: .5rem .75rem;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .75rem;
    color: #b45309;
    line-height: 1.4;
}

/* ─── Modal backdrop ─────────────────────────────────────────────────────── */
.pt-modal-backdrop {
    background: rgba(15, 15, 20, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
