/* Estilos gerais */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background-color: #F5F6F8;
    color: #111827;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

button {
    font-family: inherit;
}

.page-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.page-root.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.page-main {
    flex: 1 0 auto;
    padding: 0 16px 140px;
}

.page-container {
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .page-main {
        padding-top: 24px;
        padding-bottom: 160px;
    }
}

/* Ajustes para telas maiores (desktop) */
@media (min-width: 1024px) {
    .page-main {
        padding-top: 0;
        padding-bottom: 180px;
        padding-left: 32px;
        padding-right: 32px;
    }

    .page-container {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        gap: 20px;
    }

    /* CTA fixa responsiva: largura total no desktop, igual ao header */
    .footer-cta {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 0;
    }

    .footer-cta-inner {
        max-width: none;
        width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 18px 24px 20px;
        gap: 12px;
    }

    .footer-cta-content {
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }

    .btn-footer {
        padding: 16px 24px;
        font-size: clamp(15px, 1.2vw, 17px);
    }

    .card-title {
        font-size: 30px;
    }

    .card {
        padding: 24px 22px;
        border-radius: 20px;
    }

    .banner-item {
        min-height: 220px;
    }

    .modal {
        max-width: 520px;
    }
}

/* Header */
.header {
    width: 100%;
    margin: 0 0 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: #FFFFFF;
    padding: 8px 12px;
    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(148, 163, 184, 0.12);
}

.header-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.header-logo-wrap--left {
    justify-content: flex-start;
}

.header-logo-wrap--center {
    justify-content: center;
}

.header-logo-img {
    height: 35px;
    width: auto;
    display: block;
}

.header-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    color: #111827;
    flex-shrink: 0;
}

.header-menu-btn:hover {
    background: #F3F4F6;
}

.header-menu-btn[aria-expanded="true"] .header-menu-icon {
    background: transparent;
}

.header-menu-btn[aria-expanded="true"] .header-menu-icon::before {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.header-menu-btn[aria-expanded="true"] .header-menu-icon::after {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

.header-menu-icon {
    position: relative;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: background 0.2s;
}

.header-menu-icon::before,
.header-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s;
}

.header-menu-icon::before {
    top: -7px;
}

.header-menu-icon::after {
    bottom: -7px;
}

/* Menu slide down */
.header-nav {
    background: #FFFFFF;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-top: 1px solid #E5E7EB;
    padding: 12px 16px 20px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.header-nav.is-open {
    max-height: 320px;
    margin-bottom: 20px;
}

.header-nav[hidden] {
    display: none !important;
}

.header-nav:not([hidden]).is-open {
    display: flex !important;
}

.header-nav-link {
    display: block;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.header-nav-link:hover {
    background: #F3F4F6;
    color: #111827;
}

.header-nav-user {
    display: block;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    cursor: default;
}

.header-nav-btn-primary {
    background: linear-gradient(135deg, #16A34A, #22C55E);
    color: #FFFFFF !important;
    text-align: center;
    font-weight: 600;
}

.header-nav-btn-primary:hover {
    background: linear-gradient(135deg, #15803D, #16A34A) !important;
}

.header-text {
    text-align: center;
}

/* Cards */
.card {
    background-color: #FFFFFF;
    border-radius: 18px;
    padding: 18px 16px 18px;
    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(148, 163, 184, 0.12);
}

@media (min-width: 480px) {
    .card {
        padding: 20px 18px 20px;
        border-radius: 20px;
    }
}

.card-hero {
    padding-bottom: 20px;
}

.card-category {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: #6B7280;
    margin-bottom: 6px;
}

.card-title {
    font-size: 28px;
    line-height: 1.25;
    margin: 0;
    color: #111827;
    font-weight: 700;
}

/* centraliza categoria e título principais */
.card-hero .card-category,
.card-hero .card-title {
    text-align: center;
}

@media (min-width: 480px) {
    .card-title {
        font-size: 30px;
    }
}

.banner-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    height: auto;
}

.banner-item {
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 2 / 1;
    min-height: 164px;
}

.banner-item-primary {
    background-image: linear-gradient(145deg, #F97316, #FDBA74);
    position: relative;
    overflow: hidden;
}

.banner-item-primary::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

/* Banner com <img>: sem borda interna, altura segue a imagem (horizontal ou 9:16) */
.banner-item-primary:has(.banner-img) {
    background: none;
    aspect-ratio: auto;
    min-height: 0;
    padding: 0;
    overflow: visible;
}

.banner-item-primary:has(.banner-img)::after {
    display: none;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    vertical-align: middle;
}

.card-hero-with-banner .hero-banner {
    margin-top: 12px;
}

.banner-item-secondary {
    background-image: linear-gradient(145deg, #22C55E, #86EFAC);
}

/* Progresso */
.card-progress {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.progress-label {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.progress-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.progress-text {
    margin: 0;
    font-size: 15px;
    color: #4B5563;
}

.progress-current {
    font-weight: 700;
    color: #16A34A;
}

.progress-goal {
    font-weight: 700;
    color: #6B7280;
}

.progress-separator {
    margin: 0 4px;
}

.progress-percent {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    color: #16A34A;
}

.progress-bar {
    margin-top: 2px;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #E5E7EB;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #16A34A, #22C55E);
    transition: width 0.4s ease-out;
}

.progress-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.progress-actions .btn {
    flex: 1 1 0;
    justify-content: center;
    padding-block: 12px;
}

/* Botões */
.btn {
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.16s ease-out, color 0.16s ease-out, box-shadow 0.16s ease-out, transform 0.06s ease-out, border-color 0.16s ease-out;
}

.btn-primary {
    background: linear-gradient(135deg, #16A34A, #22C55E);
    color: #FFFFFF;
    box-shadow: none;
    border: 1px solid rgba(16, 185, 129, 0.7);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #15803D, #16A34A);
    box-shadow: none;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background-color: #FFFFFF;
    color: #16A34A;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
    background-color: #ECFDF3;
    border-color: rgba(16, 185, 129, 0.7);
}

.btn-secondary:active {
    background-color: #DCFCE7;
}

.btn-tertiary {
    background-color: transparent;
    color: #16A34A;
    border-radius: 999px;
    border: 1px solid transparent;
    padding-inline: 0;
    font-size: 13px;
}

.btn-tertiary:hover {
    border-color: rgba(16, 185, 129, 0.4);
    padding-inline: 10px;
}

.btn-footer {
    width: 100%;
    padding-block: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 15px;
    border-radius: 8px;
}

/* remove glow dos botões fixos (CTA do rodapé) */
.btn-footer.btn-primary {
    box-shadow: none;
}

.btn-footer.btn-primary:hover,
.btn-footer.btn-primary:active {
    box-shadow: none;
}

.btn:focus-visible {
    outline: 2px solid #16A34A;
    outline-offset: 2px;
}

/* Card história */
.card-story {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tabs {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-bottom: 1px solid #E5E7EB;
    gap: 4px;
}

.tab-button {
    flex: 1;
    border-radius: 0;
    padding: 8px 0;
    font-size: 15px;
    border: none;
    background-color: transparent;
    color: #6B7280;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background-color: transparent;
    transition: background-color 0.18s ease-out;
}

.tab-button.is-active {
    color: #16A34A;
    font-weight: 600;
}

.tab-button.is-active::after {
    background-color: #16A34A;
}

.tab-panels {
    margin-top: 8px;
}

.tab-panel {
    font-size: 15px;
    color: #4B5563;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.22s ease-out, transform 0.22s ease-out;
}

.tab-panel[hidden] {
    display: none;
}

.tab-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.story-paragraph {
    margin: 0 0 10px;
    line-height: 1.55;
}

.story-highlight {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background-color: #ECFDF3;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.story-highlight-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #16A34A, #22C55E);
    display: flex;
    align-items: center;
    justify-content: center;
}

.capsule-shape {
    width: 20px;
    height: 10px;
    border-radius: 999px;
    display: flex;
    overflow: hidden;
}

.capsule-half {
    flex: 1;
}

.capsule-half-a {
    background-color: #f97316;
}

.capsule-half-b {
    background-color: #facc15;
}

.story-highlight-text {
    flex: 1;
}

.story-highlight-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #166534;
}

.story-highlight-description {
    margin: 0;
    font-size: 14px;
    color: #166534;
    line-height: 1.5;
}

/* Doadores */
.donors-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.donor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.donor-main {
    display: flex;
    flex-direction: column;
}

.donor-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.donor-amount {
    font-size: 14px;
    color: #16A34A;
    font-weight: 600;
}

.donor-time {
    font-size: 13px;
    color: #9CA3AF;
}

.donors-view-all {
    width: 100%;
}

/* Depoimentos */
.testimonials-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.testimonial-item {
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 10px;
    border-left: 4px solid #16A34A;
}

.testimonial-text {
    margin: 0 0 0.5rem;
    font-size: 15px;
    line-height: 1.5;
    color: #4B5563;
}

.testimonial-author {
    margin: 0;
    font-size: 13px;
    color: #6B7280;
    font-style: italic;
}

/* Footer do site (logo + direitos reservados) – colado nas laterais igual header e CTA */
.site-footer {
    margin-top: 2rem;
    padding: 2rem 0 1rem;
    border-top: 1px solid #E5E7EB;
    background: #FFFFFF;
}

.site-footer-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.site-footer-logo {
    height: 35px;
    width: auto;
    display: block;
}

.site-footer-message {
    margin: 0;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
    max-width: 320px;
}

.site-footer-divider {
    width: 100%;
    max-width: 200px;
    margin: 0;
    border: none;
    border-top: 1px solid #E5E7EB;
}

.site-footer-copy {
    margin: 0;
    font-size: 13px;
    color: #6B7280;
}

/* Footer CTA */
.footer-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.28), transparent 40%);
    pointer-events: none;
}

.footer-cta-inner {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    background-color: #FFFFFF;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.45);
    padding: clamp(10px, 3vw, 16px) clamp(12px, 4vw, 24px);
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 2vw, 12px);
    pointer-events: auto;
}

.footer-cta-content {
    display: flex;
    flex-direction: column;
    gap: inherit;
    width: 100%;
}

@media (min-width: 480px) {
    .footer-cta-inner {
        border-radius: 12px 12px 0 0;
    }
}

.footer-cta-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding: 0;
    background-color: transparent;
    max-width: 100%;
}

.footer-cta-badge .footer-cta-badge-svg,
.footer-cta-badge svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.footer-cta-badge-icon {
    width: 16px;
    height: 16px;
    color: #16A34A;
    display: inline-flex;
}

.footer-cta-badge-svg {
    max-width: 100%;
    height: auto;
}

.footer-cta-badge-text {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #166534;
    font-weight: 700;
}

.modal-donation-badge {
    margin-top: 1.25rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px;
    z-index: 40;
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-overlay.is-open {
    opacity: 1;
}

.modal {
    background-color: #FFFFFF;
    border-radius: 12px;
    max-width: 28rem;
    width: 100%;
    padding: 1.5rem;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

/* Modal de valores: zoom out para caber inteiro na tela, sem scroll */
#donation-modal-overlay .modal {
    transform: scale(0.8);
    transform-origin: center center;
    overflow: visible;
    padding: 1.25rem;
}

@media (min-width: 480px) {
    .modal {
        padding: 1.5rem;
        border-radius: 12px;
    }
    #donation-modal-overlay .modal {
        transform: scale(0.82);
        padding: 1.25rem;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 8px;
}

.modal-logo {
    flex-shrink: 0;
}

.modal-organization {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6B7280;
    font-weight: 700;
    margin-bottom: 4px;
}

.modal-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.modal-subtitle {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: #4B5563;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background-color: rgba(243, 244, 246, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6B7280;
    transition: background-color 0.12s ease-out, color 0.12s ease-out, transform 0.06s ease-out;
}

.modal-close:hover {
    background-color: #E5E7EB;
    color: #111827;
}

.modal-close:active {
    transform: scale(0.98);
}

/* Loading: Gerando PIX */
#pix-loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}
#pix-loading-overlay.is-open {
    display: flex;
}
.pix-loading-box {
    background: rgb(255, 255, 255);
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.2) 0 4px 12px;
    max-width: 22rem;
    width: 90%;
    padding: 2rem;
    text-align: center;
    transform: scale(0.95);
    opacity: 1;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.pix-loading-spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border: 3px solid #e5e7eb;
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: pix-spin 0.8s linear infinite;
}
.pix-loading-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2B2B31;
    margin: 0 0 0.25rem;
}
.pix-loading-sub {
    font-size: 0.9rem;
    font-weight: 400;
    color: #A0A0A0;
    margin: 0;
}
@keyframes pix-spin {
    to { transform: rotate(360deg); }
}

/* Modal PIX – box estilo fornecido */
.pix-modal-box {
    background: rgb(255, 255, 255);
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.2) 0 4px 12px;
    max-width: 22rem;
    width: 90%;
    padding: 1.5rem;
    position: relative;
    transform: scale(0.95);
    opacity: 1;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#pix-modal-overlay #qrcode img {
    width: 130px;
    height: 130px;
    max-width: 130px;
    display: block;
}

/* Modal PIX no mobile: zoom out + cabe inteiro na tela */
@media (max-width: 768px) {
    #pix-modal-overlay {
        align-items: center;
        justify-content: center;
        padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
        overflow: hidden;
        box-sizing: border-box;
    }
    #pix-modal-overlay .pix-modal-box {
        max-height: min(95vh, 95dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 2rem));
        width: 100%;
        padding: 0.875rem 1rem;
        overflow: visible;
        display: flex;
        flex-direction: column;
        gap: 0;
        box-sizing: border-box;
        transform: scale(0.88);
        transform-origin: center center;
    }
    #pix-modal-overlay #pixModalContent {
        flex: 0 0 auto;
    }
    #pix-modal-overlay #pixModalContent h2 {
        font-size: 0.95rem !important;
        margin: 0 0 0.5rem !important;
    }
    #pix-modal-overlay #pixDonationText {
        padding: 0.5rem !important;
    }
    #pix-modal-overlay #pixDonationText p:first-child {
        font-size: 0.75rem !important;
        margin-bottom: 0.1rem !important;
    }
    #pix-modal-overlay #pixDonationText p:last-child {
        font-size: 1.35rem !important;
    }
    #pix-modal-overlay #pixModalContent > div[style*="margin-bottom: 1rem"] {
        margin-bottom: 0.5rem !important;
    }
    #pix-modal-overlay #pixCodeGerado {
        height: 2.25rem !important;
        font-size: 0.7rem !important;
        margin-bottom: 0.35rem !important;
    }
    #pix-modal-overlay #copyPixButton {
        height: 2.5rem !important;
        font-size: 0.8rem !important;
    }
    #pix-modal-overlay #copyPixButton svg {
        width: 16px;
        height: 16px;
    }
    #pix-modal-overlay #pixModalContent label {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }
    #pix-modal-overlay .pix-modal-box > div[style*="text-align: center"][style*="OU"] {
        margin: 0.4rem 0 !important;
        font-size: 0.65rem !important;
    }
    #pix-modal-overlay #qrcode {
        padding: 0.5rem !important;
    }
    #pix-modal-overlay #qrcode img {
        width: 130px !important;
        height: 130px !important;
        max-width: 130px !important;
    }
    #pix-modal-overlay #pixModalContent > div[style*="Escaneie o QR Code"] {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    #pix-modal-overlay #pixModalContent > div[style*="Escaneie o QR Code"] p {
        font-size: 0.7rem !important;
        margin-bottom: 0.4rem !important;
    }
    #pix-modal-overlay #pixTimerSection {
        padding: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    #pix-modal-overlay #pixTimerSection p {
        font-size: 0.65rem !important;
    }
    #pix-modal-overlay #pixTimerSection #pix-status {
        font-size: 0.65rem !important;
    }
    #pix-modal-overlay .pix-timer-spinner {
        width: 1.5rem;
        height: 1.5rem;
    }
    #pix-modal-overlay #pixProcessedSection {
        padding: 0.4rem 0.5rem !important;
        margin-bottom: 0.35rem !important;
    }
    #pix-modal-overlay #pixProcessedSection p {
        font-size: 0.6rem !important;
    }
    #pix-modal-overlay #pixSeguroSection {
        padding: 0.2rem 0.5rem !important;
        margin-top: 0.35rem !important;
        font-size: 0.6rem !important;
    }
    #pix-modal-overlay #pixSeguroSection svg {
        width: 0.8rem;
        height: 0.8rem;
    }
}

/* Telas muito baixas: reduz o modal proporcionalmente para caber sem scroll */
@media (max-width: 768px) and (max-height: 600px) {
    #pix-modal-overlay .pix-modal-box {
        transform: scale(0.82);
        transform-origin: center center;
    }
}
@media (max-width: 768px) and (max-height: 500px) {
    #pix-modal-overlay .pix-modal-box {
        transform: scale(0.7);
        transform-origin: center center;
    }
}

/* iPhone / iOS: Safari reporta viewport maior que o visível – scale fixo para o modal caber inteiro */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        #pix-modal-overlay .pix-modal-box {
            max-height: none;
            transform: scale(0.82);
            transform-origin: center center;
        }
    }
    @media (max-width: 768px) and (max-height: 700px) {
        #pix-modal-overlay .pix-modal-box {
            transform: scale(0.78);
            transform-origin: center center;
        }
    }
    @media (max-width: 768px) and (max-height: 600px) {
        #pix-modal-overlay .pix-modal-box {
            transform: scale(0.7);
            transform-origin: center center;
        }
    }
    @media (max-width: 768px) and (max-height: 500px) {
        #pix-modal-overlay .pix-modal-box {
            transform: scale(0.6);
            transform-origin: center center;
        }
    }
}

/* Campo código PIX: barra única, rolagem horizontal para ver tudo */
#pix-modal-overlay #pixCodeGerado {
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: clip;
    -webkit-overflow-scrolling: touch;
}

/* Modal Obrigado – fade ao abrir */
#thank-you-modal-overlay {
    background-color: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease-out;
}
#thank-you-modal-overlay.is-open {
    opacity: 1;
}
#thank-you-modal-overlay.is-open #thank-you-modal {
    opacity: 1;
    transform: scale(1);
}
#thank-you-modal {
    position: relative;
    background: rgb(255, 255, 255);
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.2) 0 4px 12px;
    max-width: 22rem;
    width: 90%;
    padding: 1.5rem;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.thank-you-modal-inner {
    text-align: center;
    padding: 1rem 0;
}
.thank-you-icon-wrap {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thank-you-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
}
.thank-you-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}
.thank-you-amount-box {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1.5rem;
    display: block;
    width: fit-content;
    min-width: 15rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.thank-you-amount-label {
    font-size: 0.875rem;
    color: #047857;
    margin: 0 0 0.125rem;
    font-weight: 500;
}
.thank-you-amount-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #059669;
    margin: 0;
}
.thank-you-success-box {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.thank-you-success-box p {
    font-size: 0.875rem;
    color: #374151;
    margin: 0;
    line-height: 1.5;
}

/* Upsell no modal Obrigado */
.thank-you-upsell {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}
.thank-you-upsell-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.thank-you-upsell-text {
    font-size: 0.875rem;
    color: #047857;
    margin: 0 0 1rem;
    line-height: 1.45;
}
.thank-you-upsell-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.thank-you-upsell-btn {
    width: 100%;
    height: 2.75rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    background: #fff;
    color: #047857;
    border: 2px solid #10b981;
}
.thank-you-upsell-btn:hover {
    background: #059669;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}
.thank-you-upsell-btn-featured {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: #047857;
    font-size: 1.05rem;
}
.thank-you-upsell-btn-featured:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.45);
}
.thank-you-close-btn {
    width: 100%;
    height: 3rem;
    background: #e5e7eb;
    color: #4b5563;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.thank-you-close-btn:hover {
    background: #d1d5db;
    color: #374151;
}

/* Modal Obrigado – responsivo mobile: cabe na tela sem scroll, com margens */
@media (max-width: 768px) {
    #thank-you-modal-overlay {
        padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    #thank-you-modal {
        max-width: min(22rem, calc(100vw - 1.5rem));
        width: 100%;
        padding: 0.75rem;
        margin: auto;
        max-height: min(calc(100vh - 1.5rem), calc(100dvh - 1.5rem));
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    #thank-you-modal .thank-you-modal-inner {
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: 0.25rem 0 0;
    }
    #thank-you-modal .modal-close {
        top: 0.375rem;
        right: 0.375rem;
    }
    .thank-you-icon-wrap {
        width: 3rem;
        height: 3rem;
        margin: 0 auto 0.5rem;
        flex-shrink: 0;
    }
    .thank-you-icon-wrap svg {
        width: 28px;
        height: 28px;
    }
    .thank-you-title {
        font-size: 1.2rem;
        margin: 0 0 0.25rem;
    }
    .thank-you-subtitle {
        font-size: 0.8125rem;
        margin: 0 0 0.5rem;
        line-height: 1.35;
    }
    .thank-you-amount-box {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    .thank-you-amount-label {
        font-size: 0.75rem;
        margin: 0 0 0.125rem;
    }
    .thank-you-amount-value {
        font-size: 1.35rem;
    }
    .thank-you-success-box {
        padding: 0.4rem 0.75rem;
        margin-bottom: 0.5rem;
    }
    .thank-you-success-box p {
        font-size: 0.75rem;
    }
    .thank-you-upsell {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
        flex-shrink: 0;
    }
    .thank-you-upsell-title {
        font-size: 0.9375rem;
        margin: 0 0 0.25rem;
    }
    .thank-you-upsell-text {
        font-size: 0.75rem;
        margin: 0 0 0.5rem;
        line-height: 1.3;
    }
    .thank-you-upsell-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.35rem;
    }
    .thank-you-upsell-btn {
        min-height: 2.5rem;
        height: 2.5rem;
        padding: 0.35rem 0.25rem;
        font-size: 0.8rem;
        -webkit-tap-highlight-color: transparent;
    }
    .thank-you-upsell-btn-featured {
        font-size: 0.85rem;
    }
    .thank-you-close-btn {
        min-height: 2.5rem;
        height: 2.5rem;
        padding: 0.35rem 0.5rem;
        font-size: 0.8125rem;
        -webkit-tap-highlight-color: transparent;
        flex-shrink: 0;
    }
}

@media (max-width: 380px) {
    #thank-you-modal {
        padding: 0.5rem;
    }
    #thank-you-modal .modal-close {
        width: 1.75rem;
        height: 1.75rem;
        top: 0.25rem;
        right: 0.25rem;
        font-size: 1.1rem;
    }
    .thank-you-icon-wrap {
        width: 2.5rem;
        height: 2.5rem;
    }
    .thank-you-icon-wrap svg {
        width: 22px;
        height: 22px;
    }
    .thank-you-title {
        font-size: 1.1rem;
    }
    .thank-you-upsell-btn {
        font-size: 0.7rem;
        min-height: 2.25rem;
        height: 2.25rem;
    }
    .thank-you-close-btn {
        min-height: 2.25rem;
        height: 2.25rem;
        font-size: 0.75rem;
    }
}

.pix-timer-spinner {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border: 2px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: pix-spin 1s linear infinite;
}
#pixTimerSection.pix-timer-done {
    background: rgb(236, 253, 245);
}
#pixTimerSection.pix-timer-done .pix-timer-spinner {
    display: none;
}
#pixTimerSection.pix-timer-done #pix-status {
    color: #047857;
    font-weight: 600;
}

.modal-values-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.value-button {
    position: relative;
    width: 100%;
    height: 3rem;
    border-radius: 0.375rem;
    border: 2px solid #d1d5db;
    background-color: #FFFFFF;
    color: #047857;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    font-size: 1.05rem;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.value-button:hover {
    background: linear-gradient(to bottom right, #ECFDF5, #D1FAE5);
    border-color: #10B981;
    color: #047857;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.value-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.value-button.is-featured {
    width: 100%;
    height: 3rem;
    font-size: 1.05rem;
    font-weight: bold;
    background: linear-gradient(to bottom right, #ECFDF5, #D1FAE5);
    border: 2px solid #10B981;
    color: #047857;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}
.value-button.is-featured:hover {
    background: linear-gradient(to bottom right, #D1FAE5, #A7F3D0);
    border-color: #10B981;
    color: #047857;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.value-text {
    z-index: 1;
}

.value-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    padding: 0.12rem 0.3rem;
    border-radius: 9999px;
    background: linear-gradient(to right, #10B981, #059669);
    color: #FFFFFF;
    font-size: 0.5rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Bloco "OU DIGITE OUTRO VALOR" no modal */
.modal-custom-value-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #d1d5db;
}
.modal-custom-value-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4B5563;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 0.5rem;
}
.modal-custom-value-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0 0.75rem;
    margin-bottom: 0.25rem;
}
.modal-custom-value-prefix {
    font-weight: 700;
    color: #047857;
    font-size: 1rem;
    margin-right: 0.5rem;
}
.modal-custom-value-input {
    flex: 1;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    padding: 0.75rem 0;
    outline: none;
    min-width: 0;
}
.modal-custom-value-input::placeholder {
    color: #9ca3af;
}
.modal-custom-value-error {
    font-size: 0.75rem;
    color: #dc2626;
    margin: 0 0 0.5rem;
    min-height: 1.25rem;
}
.modal-custom-value-doar {
    width: 100%;
    margin-top: 0.5rem;
    transition: opacity 0.2s, background 0.2s;
}
.modal-custom-value-doar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.modal-custom-value-doar:not(:disabled):hover {
    opacity: 1;
}

/* Aviso de pagamento seguro no modal */
.safe-payment-badge {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}

.safe-payment-badge .safe-payment-svg {
    flex-shrink: 0;
    stroke: #16A34A;
}

.safe-badge-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #166534;
    line-height: 1.4;
}

.safe-badge-text strong {
    font-weight: 600;
    color: #15803D;
}

.safe-badge-text span {
    font-size: 0.8125rem;
    color: #15803D;
    opacity: 0.9;
}

/* Modais Entrar / Cadastrar (fake) */
.auth-modal-overlay {
    z-index: 50;
}

.auth-modal {
    max-width: 360px;
    width: 100%;
}

.auth-modal-title {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.auth-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #16A34A;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.auth-submit {
    margin-top: 0.25rem;
    width: 100%;
    padding: 12px;
}

.auth-hint {
    margin: 1rem 0 0;
    font-size: 12px;
    color: #9CA3AF;
    text-align: center;
}

.auth-modal-close {
    top: 12px;
    right: 12px;
}

/* Toast */
.toast {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 90px;
    z-index: 35;
    display: flex;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.16s ease-out, transform 0.16s ease-out;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast::before {
    content: attr(data-message);
    max-width: 420px;
    background-color: #111827;
    color: #F9FAFB;
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.55);
    pointer-events: auto;
}

@media (min-width: 480px) {
    .toast {
        bottom: 100px;
    }
}

/* Estado de body com modal aberto */
body.modal-open {
    overflow: hidden;
}

