/* ============================================
   MODAL PIX MODERNO - BELMONTE DELIVERY
   Design Tipo Fintech
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-show {
    opacity: 1 !important;
}

.modal-show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    opacity: 1 !important;
}

.modal-content-show {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.modal-content-show {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--light-text);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    background: transparent;
    border: none;
    padding: 0;
}

.close-modal svg {
    width: 24px;
    height: 24px;
    color: var(--light-text);
}

/* Esconder o X quando o modal não está visível */
.modal:not(.modal-show) .close-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Garantir que nenhum botão de fechar apareça no rodapé */
.main-footer .close-modal,
.main-footer .close,
.main-footer button.close-modal,
.main-footer span.close-modal,
footer .close-modal,
footer .close,
footer button.close-modal,
footer span.close-modal,
.main-footer *[class*="close"],
footer *[class*="close"],
.main-footer *[class*="close"] *,
footer *[class*="close"] * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    text-indent: -9999px !important;
}

/* Remover qualquer elemento com conteúdo "×" no rodapé */
.main-footer *::before,
.main-footer *::after {
    content: none !important;
}

.main-footer span[class*="close"]::before,
.main-footer span[class*="close"]::after,
footer span[class*="close"]::before,
footer span[class*="close"]::after {
    content: none !important;
}

/* Garantir que elementos dentro do rodapé não herdem posicionamento absoluto */
.main-footer * {
    position: static !important;
}

.main-footer [style*="position: absolute"],
footer [style*="position: absolute"] {
    display: none !important;
}

.close-modal:hover {
    background: #f5f5f5;
    color: var(--dark-text);
    transform: rotate(90deg);
}

/* Cabeçalho do Modal PIX */
.pix-modal-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.pix-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(50, 205, 50, 0.3);
}

.pix-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pix-subtitle {
    font-size: 0.9rem;
    color: var(--light-text);
    margin: 0;
}

/* Card de Valor */
.pix-amount-card {
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e9 100%);
    margin: 1.5rem 2rem;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 2px solid #e8f5e9;
}

.pix-amount-label {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.pix-amount-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #32CD32;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* Seção Chave PIX */
.pix-key-section {
    padding: 0 2rem 1.5rem;
}

.pix-key-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.75rem;
}

.pix-key-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.pix-key-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.pix-key-input:focus {
    outline: none;
    border-color: #32CD32;
    background: white;
    box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.1);
}

.btn-pix-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-pix-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(50, 205, 50, 0.4);
}

.btn-pix-copy:active {
    transform: translateY(0);
}

.pix-copy-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2e7d32;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

/* Status do Pagamento */
.pix-status-section {
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.pix-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pix-status-badge.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.pix-status-badge.status-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.pix-status-badge.status-expired {
    background: #ffebee;
    color: #c62828;
}

/* Instruções */
.pix-instructions {
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.pix-instructions p {
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.6;
    margin: 0;
}

/* Botão WhatsApp */
.btn-whatsapp {
    width: calc(100% - 4rem);
    margin: 0 2rem 2rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-whatsapp svg {
    width: 24px;
    height: 24px;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
        margin-bottom: 0;
        max-height: 90vh;
    }
    
    .pix-modal-header {
        padding: 2rem 1.5rem 1rem;
    }
    
    .pix-amount-card {
        margin: 1rem 1.5rem;
        padding: 1.25rem;
    }
    
    .pix-amount-value {
        font-size: 2rem;
    }
    
    .pix-key-section,
    .pix-status-section,
    .pix-instructions {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .pix-key-container {
        flex-direction: column;
    }
    
    .btn-pix-copy {
        width: 100%;
        justify-content: center;
    }
    
    .btn-whatsapp {
        width: calc(100% - 3rem);
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pix-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .pix-amount-value {
        font-size: 1.75rem;
    }
}

