/*
 * Cursos AB — página de checkout / finalizar compra
 */

body.checkout-shortcode-only .site-header,
body.has-cursos-ab-checkout .site-header {
    position: relative;
    z-index: 2;
}

body.checkout-shortcode-only #site-main,
body.has-cursos-ab-checkout #site-main.site-main--checkout {
    padding: 0 !important;
}

body.checkout-shortcode-only .entry-title,
body.checkout-shortcode-only .checkout-shortcode-page .entry-title {
    display: none;
}

body.checkout-shortcode-only .site-main .container,
body.has-cursos-ab-checkout .site-main .container {
    max-width: none;
    padding-inline: 0;
}

body.checkout-shortcode-only .checkout-shortcode-page .entry-content,
body.has-cursos-ab-checkout .checkout-shortcode-page .entry-content {
    margin: 0;
    padding: 0;
}

.cursos-ab-checkout {
    position: relative;
    min-height: min(100vh, 100dvh);
    padding-block: clamp(1.75rem, 4vw, 2.75rem);
    padding-inline: clamp(1rem, 3.5vw, 2.5rem);
    isolation: isolate;
}

.cursos-ab-checkout__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.55;
    pointer-events: none;
}

.cursos-ab-checkout__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(72rem, 100%);
    margin-inline: auto;
}

.cursos-ab-checkout__back {
    margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.cursos-ab-checkout__back-link {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ab-primary, #5c1418);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cursos-ab-checkout__back-link:hover {
    color: #4a1014;
    text-decoration: underline;
}

.cursos-ab-checkout__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(1.5rem, 3vw, 2.75rem);
    align-items: start;
}

.cursos-ab-checkout__order {
    padding-block: clamp(0.25rem, 1vw, 0.75rem);
}

.cursos-ab-checkout__secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(92, 20, 24, 0.08);
    color: var(--ab-primary, #5c1418);
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cursos-ab-checkout__secure-icon {
    display: inline-flex;
    color: var(--ab-primary, #5c1418);
}

.cursos-ab-checkout__title {
    font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
    font-size: clamp(2rem, 3.5vw, 2.65rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ab-secondary, #1f1f1f);
    margin-bottom: 0.5rem;
}

.cursos-ab-checkout__lead {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: clamp(1rem, 1.5vw, 1.0625rem);
    line-height: 1.55;
    color: var(--ab-text-muted, #5f6368);
    margin-bottom: 1.5rem;
    max-width: 28rem;
}

.cursos-ab-checkout__summary {
    padding: clamp(1.15rem, 2.5vw, 1.5rem);
    margin-bottom: 1.35rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(92, 20, 24, 0.1);
    box-shadow: 0 8px 28px rgba(31, 31, 31, 0.04);
}

.cursos-ab-checkout__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}

.cursos-ab-checkout__price-note {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ab-text-muted, #5f6368);
}

.cursos-ab-checkout__product {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--ab-text, #2b2b2b);
    margin-bottom: 0.35rem;
}

.cursos-ab-checkout__product-note {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ab-text-muted, #5f6368);
    margin-bottom: 0;
}

.cursos-ab-checkout__points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.35rem;
    display: grid;
    gap: 0.55rem;
}

.cursos-ab-checkout__points li {
    position: relative;
    padding-left: 1.35rem;
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--ab-text, #2b2b2b);
}

.cursos-ab-checkout__points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--ab-primary, #5c1418);
}

.cursos-ab-checkout__card-brands {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.cursos-ab-checkout__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    min-height: 2rem;
    padding: 0.25rem 0.45rem;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cursos-ab-checkout__brand img {
    display: block;
    width: auto;
    max-width: 2.75rem;
    height: 1.25rem;
    object-fit: contain;
}

.cursos-ab-checkout__payment {
    position: sticky;
    top: clamp(1rem, 3vw, 1.5rem);
}

.cursos-ab-checkout__payment-panel {
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 16px 48px rgba(31, 31, 31, 0.08),
        0 2px 8px rgba(31, 31, 31, 0.04);
}

.cursos-ab-checkout__processor-note {
    margin-top: 0.85rem;
    text-align: center;
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 0.8125rem;
    color: var(--ab-text-muted, #5f6368);
}

.checkout-payment-area .cursos-ab-payment--embed {
    margin: 0;
}

.checkout-payment-area .cursos-ab-payment--embed#cursos-ab-payment-form {
    padding: 0;
    min-height: 0;
}

.checkout-payment-empty {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ab-text-muted, #5f6368);
}

.checkout-payment-area .btn,
.checkout-payment-area button[type='submit'],
.checkout-payment-area input[type='submit'],
.checkout-payment-area input[type='button'] {
    border-radius: var(--bs-border-radius-pill, 999px);
}

@media (max-width: 991.98px) {
    .cursos-ab-checkout__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cursos-ab-checkout__payment {
        position: static;
    }

    .cursos-ab-checkout__lead {
        max-width: none;
    }
}

@media (min-width: 992px) {
    .cursos-ab-checkout {
        display: flex;
        align-items: center;
    }

    .cursos-ab-checkout__inner {
        width: 100%;
    }
}
