/* ================================================================
   Apoie.css — Infobairro · Página de Apoio
   Paleta: Azul + Branco · Estilo: Soft Modern UI
   Compatível com Bootstrap 5.3 data-bs-theme="dark"
   ================================================================ */

/* ───────── Variáveis Customizadas ───────── */
:root {
    /* Primário */
    --ib-primary: #2563EB;
    --ib-primary-rgb: 37, 99, 235;
    --ib-primary-hover: #1D4ED8;
    --ib-primary-active: #1E40AF;
    --ib-primary-surface: #EBF2FF;

    /* Sucesso (feedback de copiar) */
    --ib-success: #10B981;
    --ib-success-rgb: 16, 185, 129;
    --ib-success-surface: #D1FAE5;

    /* Superfícies */
    --ib-page-bg: #F0F6FF;
    --ib-card-bg: #FFFFFF;
    --ib-card-border: #DCE5F2;
    --ib-input-bg: #F6F9FF;
    --ib-input-border: #CBD5E8;

    /* Texto */
    --ib-text: #1A2332;
    --ib-text-secondary: #5A6B80;
    --ib-text-muted: #8896A6;

    /* Sombras */
    --ib-shadow-card: 0 2px 20px rgba(var(--ib-primary-rgb), 0.06);
    --ib-shadow-card-hover: 0 8px 40px rgba(var(--ib-primary-rgb), 0.12);
    --ib-shadow-btn: 0 2px 8px rgba(var(--ib-primary-rgb), 0.25);
    --ib-shadow-btn-hover: 0 4px 16px rgba(var(--ib-primary-rgb), 0.35);

    /* Raios de borda */
    --ib-radius-sm: 0.625rem;
    --ib-radius: 1rem;
    --ib-radius-lg: 1.25rem;
    --ib-radius-xl: 1.5rem;

    /* Transições */
    --ib-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ib-transition: 0.3s var(--ib-ease);

    /* Gradiente do ícone hero */
    --ib-hero-gradient: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    --ib-hero-shadow: 0 8px 32px rgba(var(--ib-primary-rgb), 0.35);
}

/* ───────── Dark Mode ───────── */
[data-bs-theme="dark"] {
    --ib-primary: #4A90FF;
    --ib-primary-rgb: 74, 144, 255;
    --ib-primary-hover: #6AA8FF;
    --ib-primary-active: #3B7BE6;
    --ib-primary-surface: rgba(74, 144, 255, 0.1);

    --ib-success: #34D399;
    --ib-success-rgb: 52, 211, 153;
    --ib-success-surface: rgba(52, 211, 153, 0.12);

    --ib-page-bg: #0B1120;
    --ib-card-bg: #141E30;
    --ib-card-border: #1E2D42;
    --ib-input-bg: #0F1926;
    --ib-input-border: #263348;

    --ib-text: #EDF2F7;
    --ib-text-secondary: #c4d4e3;
    --ib-text-muted: #a3b8cd;

    --ib-shadow-card: 0 2px 20px rgba(0, 0, 0, 0.25);
    --ib-shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.4);
    --ib-shadow-btn: 0 2px 8px rgba(var(--ib-primary-rgb), 0.2);
    --ib-shadow-btn-hover: 0 4px 16px rgba(var(--ib-primary-rgb), 0.3);

    --ib-hero-gradient: linear-gradient(135deg, #3B82F6 0%, #22D3EE 100%);
    --ib-hero-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.container-fluid {
    display: flex;
    flex-direction: column;
    align-items: center;
}

[data-bs-theme="dark"] .img-asaas {
    background-image: url("/img/AsaasEscuro.png");
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0.3));
}
.img-asaas {
    background-image: url("/img/Asaas.png");
    height: 22.9px;
    width: 25px;
    background-position: center;
    background-size: cover;
}
/* ───────── Reset e Base ───────── */
.ib-page {
    width: 100%;
    background-color: var(--ib-page-bg);
    color: var(--ib-text);
    min-height: 100vh;
    padding-bottom: 3rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ───────── Animações de Entrada ───────── */
@keyframes ibFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ibPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@keyframes ibSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ibCheckPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.25);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ───────── HERO ───────── */
.ib-hero {
    padding: 3.5rem 1.25rem 1rem;
    animation: ibFadeUp 0.6s var(--ib-ease) both;
}

.ib-hero-icon-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--ib-hero-gradient);
    box-shadow: var(--ib-hero-shadow);
    margin-bottom: 1.5rem;
    transition: transform var(--ib-transition), box-shadow var(--ib-transition);
}

.ib-hero-icon-ring:hover {
    transform: scale(1.06);
}

.ib-hero-icon {
    font-size: 2rem;
    color: #FFFFFF;
    line-height: 1;
}

/* Container do SVG */
.ib-coffee-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Base da fumaça */
.steam {
    fill: none;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: steam-rise 2.4s ease-in-out infinite;
}

/* Delay escalonado para cada fio de fumaça */
.steam-1 { animation-delay: 0s; }
.steam-2 { animation-delay: 0.6s; }
.steam-3 { animation-delay: 1.2s; }

@keyframes steam-rise {
    0% {
        stroke-dashoffset: 30;
        opacity: 0;
        transform: translateY(0);
    }
    20% {
        opacity: 0.8;
    }
    60% {
        opacity: 0.4;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* Respeita preferência de redução de movimento */
@media (prefers-reduced-motion: reduce) {
    .steam {
        animation: none;
        stroke-dashoffset: 0;
        opacity: 0.6;
    }
}
.ib-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--ib-text);
}

.ib-hero-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ib-text-secondary);
    max-width: 520px;
    margin: 0 auto;
}

.ib-impact, .ib-cards, .ib-footer-msg {
    display: flex;
    justify-content: center;
}

/* ───────── IMPACTO ───────── */
.ib-impact {
    padding: 0.75rem 1.25rem 2rem;
    animation: ibFadeUp 0.6s var(--ib-ease) 0.12s both;
}

.ib-impact-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ib-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.ib-impact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--ib-radius-sm);
    background: var(--ib-primary-surface);
    transition: transform var(--ib-transition), background var(--ib-transition);
}

.ib-impact-item:hover {
    transform: translateY(-2px);
}

.ib-impact-item i {
    font-size: 1.25rem;
    color: var(--ib-primary);
}

.ib-impact-item span {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ib-text-secondary);
    line-height: 1.3;
}

/* ───────── CARDS ───────── */
.ib-cards {
    padding: 0 1.25rem 2rem;
}

.ib-card {
    justify-content: space-between;
    background: var(--ib-card-bg);
    border: 1px solid var(--ib-card-border);
    border-radius: var(--ib-radius-xl);
    padding: 1.75rem;
    box-shadow: var(--ib-shadow-card);
    transition: box-shadow var(--ib-transition), transform var(--ib-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ib-card:hover {
    box-shadow: var(--ib-shadow-card-hover);
    transform: translateY(-3px);
}

/* Animação de entrada escalonada */
.ib-card--pix {
    animation: ibFadeUp 0.6s var(--ib-ease) 0.24s both;
}

.ib-card--mp {
    animation: ibFadeUp 0.6s var(--ib-ease) 0.38s both;
}

/* Card Head */
.ib-card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.ib-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--ib-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #FFFFFF;
}

.ib-card-icon--pix {
    background: linear-gradient(135deg, #2563EB, #06B6D4);
}

[data-bs-theme="dark"] .ib-card-icon--pix {
    background: linear-gradient(135deg, #3B82F6, #22D3EE);
}

.ib-card-icon--mp {
    background: linear-gradient(135deg, #06B6D4, #10B981);
}

[data-bs-theme="dark"] .ib-card-icon--mp {
    background: linear-gradient(135deg, #22D3EE, #34D399);
}

.ib-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    color: var(--ib-text);
}

.ib-card-subtitle {
    font-size: 0.85rem;
    color: var(--ib-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ───────── QR CODE PLACEHOLDER ───────── */
.ib-qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border: 2px dashed var(--ib-card-border);
    border-radius: var(--ib-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ib-input-bg);
    overflow: hidden;
    transition: border-color var(--ib-transition), background var(--ib-transition);
}

/* Quando uma imagem de QR Code é inserida, esconde o placeholder interno */
.ib-qr-placeholder:has(.ib-qr-img) .ib-qr-placeholder-inner {
    display: none;
}

.ib-qr-placeholder:has(.ib-qr-img) {
    border: none;
    background: transparent;
}

.ib-qr-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--ib-text-muted);
    opacity: 0.6;
}

.ib-qr-placeholder-inner i {
    font-size: 2.5rem;
}

.ib-qr-placeholder-inner span {
    font-size: 0.8rem;
    font-weight: 500;
}

.ib-qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--ib-radius);
    border: 10px white solid;
}

/* ───────── CHAVE PIX ───────── */
.ib-pix-key-block {
    margin-bottom: 1.25rem;
}

.ib-pix-key-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ib-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.ib-pix-key-value {
    background: var(--ib-input-bg);
    border: 1px solid var(--ib-input-border);
    border-radius: var(--ib-radius-sm);
    padding: 0.65rem 0.85rem;
    overflow-x: auto;
    transition: border-color var(--ib-transition), background var(--ib-transition);
}

.ib-pix-key-value code {
    font-size: 0.82rem;
    color: var(--ib-text);
    word-break: break-all;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.ib-pix-key-type {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--ib-text-muted);
}

/* ───────── BOTÕES ───────── */
.ib-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.8rem 1.25rem;
    border-radius: var(--ib-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--ib-transition),
    border-color var(--ib-transition),
    color var(--ib-transition),
    box-shadow var(--ib-transition),
    transform 0.15s var(--ib-ease);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.ib-btn:active {
    transform: scale(0.97);
}

/* Botão Primário */
.ib-btn--primary {
    background: var(--ib-primary);
    color: #FFFFFF;
    border-color: var(--ib-primary);
    box-shadow: var(--ib-shadow-btn);
}

.ib-btn--primary:hover {
    background: var(--ib-primary-hover);
    border-color: var(--ib-primary-hover);
    box-shadow: var(--ib-shadow-btn-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.ib-btn--primary:active {
    background: var(--ib-primary-active);
    border-color: var(--ib-primary-active);
    transform: scale(0.97) translateY(0);
    box-shadow: var(--ib-shadow-btn);
}

.ib-btn--primary:focus-visible {
    outline: 3px solid rgba(var(--ib-primary-rgb), 0.4);
    outline-offset: 2px;
}

/* Botão Primário — Estado "Copiado" */
.ib-btn--primary.ib-btn--copied {
    background: var(--ib-success);
    border-color: var(--ib-success);
    box-shadow: 0 2px 12px rgba(var(--ib-success-rgb), 0.3);
    pointer-events: none;
}

.ib-btn--primary.ib-btn--copied i {
    animation: ibCheckPop 0.35s var(--ib-ease);
}

/* Botão Ghost (outline sutil) */
.ib-btn--ghost {
    background: transparent;
    color: var(--ib-text-secondary);
    border-color: var(--ib-card-border);
}

.ib-btn--ghost:hover {
    background: var(--ib-primary-surface);
    color: var(--ib-primary);
    border-color: var(--ib-primary);
    transform: translateY(-1px);
}

.ib-btn--ghost:active {
    transform: scale(0.97) translateY(0);
}

.ib-btn--ghost:focus-visible {
    outline: 3px solid rgba(var(--ib-primary-rgb), 0.4);
    outline-offset: 2px;
}

/* ───────── QUICK AMOUNTS ───────── */
.ib-quick-amounts {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ib-quick-btn {
    flex: 1;
    padding: 0.55rem 0;
    border: 1.5px solid var(--ib-card-border);
    border-radius: var(--ib-radius-sm);
    background: var(--ib-input-bg);
    color: var(--ib-text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ib-transition),
    border-color var(--ib-transition),
    color var(--ib-transition),
    box-shadow var(--ib-transition),
    transform 0.15s var(--ib-ease);
}

.ib-quick-btn:hover {
    border-color: var(--ib-primary);
    color: var(--ib-primary);
    background: var(--ib-primary-surface);
    transform: translateY(-1px);
}

.ib-quick-btn:active {
    transform: scale(0.96);
}

.ib-quick-btn--active {
    background: var(--ib-primary);
    border-color: var(--ib-primary);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(var(--ib-primary-rgb), 0.25);
}

.ib-quick-btn--active:hover {
    background: var(--ib-primary-hover);
    border-color: var(--ib-primary-hover);
    color: #FFFFFF;
}

.ib-quick-btn:focus-visible {
    outline: 3px solid rgba(var(--ib-primary-rgb), 0.4);
    outline-offset: 2px;
}

/* ───────── INPUT DE VALOR ───────── */
.ib-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--ib-input-border);
    border-radius: var(--ib-radius);
    background: var(--ib-input-bg);
    overflow: hidden;
    transition: border-color var(--ib-transition), box-shadow var(--ib-transition), background var(--ib-transition);
    margin-bottom: 0.35rem;
}

.ib-input-wrap:focus-within {
    border-color: var(--ib-primary);
    box-shadow: 0 0 0 3px rgba(var(--ib-primary-rgb), 0.15);
    background: var(--ib-card-bg);
}

.ib-input-wrap.ib-input-wrap--error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.ib-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ib-text-muted);
    background: transparent;
    border-right: 1px solid var(--ib-input-border);
    user-select: none;
}

.ib-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 0.85rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ib-text);
    outline: none;
    -moz-appearance: textfield;
}

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

.ib-input::placeholder {
    color: var(--ib-text-muted);
    font-weight: 400;
}

/* Mensagem de erro do input */
.ib-input-error {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #EF4444;
    margin-bottom: 0.85rem;
    padding-left: 0.25rem;
}

.ib-input-error i {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ib-input-error.ib-input-error--visible {
    display: flex;
    animation: ibFadeUp 0.25s var(--ib-ease) both;
}

/* ───────── LOADING (Mercado Pago) ───────── */
.ib-mp-state--hidden {
    display: none !important;
}

.ib-mp-state--enter {
    animation: ibFadeUp 0.4s var(--ib-ease) both;
}

.ib-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1rem;
    flex: 1;
}

.ib-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid var(--ib-card-border);
    border-top-color: var(--ib-primary);
    border-radius: 50%;
    animation: ibSpin 0.75s linear infinite;
}

.ib-loading-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ib-text-secondary);
    margin: 0;
}

/* ───────── RESULTADO MERCADO PAGO ───────── */
#mp-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.ib-mp-qr-wrap {
    width: 200px;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: var(--ib-radius-lg);
    overflow: hidden;
    background: #FFFFFF;
    padding: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-bs-theme="dark"] .ib-mp-qr-wrap {
    background: #FFFFFF;
}

.ib-mp-qr-wrap .ib-qr-img {
    border-radius: var(--ib-radius-sm);
}

.ib-mp-hint {
    font-size: 0.85rem;
    color: var(--ib-text-muted);
    margin: 0 0 1rem;
}

.ib-mp-line-box {
    width: 100%;
    background: var(--ib-input-bg);
    border: 1px solid var(--ib-input-border);
    border-radius: var(--ib-radius-sm);
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    max-height: 80px;
    overflow-y: auto;
}

.ib-mp-line-code {
    font-size: 0.7rem;
    color: var(--ib-text-secondary);
    word-break: break-all;
    line-height: 1.5;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

#mp-result .ib-btn {
    margin-bottom: 0.5rem;
}

#mp-result .ib-btn:last-child {
    margin-bottom: 0;
}

/* ───────── FOOTER MESSAGE ───────── */
.ib-footer-msg {
    padding: 1rem 1.25rem 2rem;
    animation: ibFadeUp 0.6s var(--ib-ease) 0.52s both;
}

.ib-footer-msg p {
    font-size: 0.95rem;
    color: var(--ib-text-muted);
    margin: 0;
    font-weight: 500;
}

.ib-heart-pulse {
    color: #EF4444;
    font-size: 0.9rem;
    margin-right: 0.25rem;
    animation: ibPulse 2s ease-in-out infinite;
}

[data-bs-theme="dark"] .ib-heart-pulse {
    color: #F87171;
}

/* ───────── FOCUS VISIBLE GLOBAL ───────── */
*:focus-visible {
    outline: 3px solid rgba(var(--ib-primary-rgb), 0.4);
    outline-offset: 2px;
}

/* ───────── SCROLLBAR CUSTOM (Webkit) ───────── */
.ib-pix-key-value::-webkit-scrollbar,
.ib-mp-line-box::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.ib-pix-key-value::-webkit-scrollbar-track,
.ib-mp-line-box::-webkit-scrollbar-track {
    background: transparent;
}

.ib-pix-key-value::-webkit-scrollbar-thumb,
.ib-mp-line-box::-webkit-scrollbar-thumb {
    background: var(--ib-card-border);
    border-radius: 4px;
}

/* ───────── REDUCED MOTION ───────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ───────── RESPONSIVIDADE ───────── */

/* Tablets e telas médias */
@media (max-width: 991.98px) {
    .ib-hero {
        padding-top: 2.5rem;
    }

    .ib-hero-title {
        font-size: 1.6rem;
    }

    .ib-card {
        padding: 1.5rem;
    }
}

/* Celulares */
@media (max-width: 575.98px) {
    .ib-hero {
        padding: 2rem 1rem 0.75rem;
    }

    .ib-hero-icon-ring {
        width: 72px;
        height: 72px;
    }

    .ib-hero-icon {
        font-size: 1.7rem;
    }

    .ib-hero-title {
        font-size: 1.4rem;
    }

    .ib-hero-text {
        font-size: 0.95rem;
    }

    .ib-impact {
        padding: 0.5rem 1rem 1.5rem;
    }

    .ib-impact-item span {
        font-size: 0.72rem;
    }

    .ib-cards {
        padding: 0 0.75rem 1.5rem;
    }

    .ib-card {
        padding: 1.25rem;
        border-radius: var(--ib-radius-lg);
    }

    .ib-card-title {
        font-size: 1.05rem;
    }

    .ib-qr-placeholder {
        width: 180px;
        height: 180px;
    }

    .ib-mp-qr-wrap {
        width: 180px;
        height: 180px;
    }

    .ib-quick-amounts {
        gap: 0.4rem;
    }

    .ib-quick-btn {
        padding: 0.5rem 0;
        font-size: 0.82rem;
    }

    .ib-btn {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }

    .ib-footer-msg {
        padding: 0.75rem 1rem 1.5rem;
    }
}

/* Celulares muito pequenos */
@media (max-width: 359.98px) {
    .ib-impact-item span {
        font-size: 0.65rem;
    }

    .ib-quick-btn {
        font-size: 0.75rem;
        padding: 0.45rem 0;
    }

    .ib-qr-placeholder,
    .ib-mp-qr-wrap {
        width: 160px;
        height: 160px;
    }
}