/* MODAL DE PAGAMENTO - DESIGN NOVO (Privacy 4.0) */
.payment-modal-overlay,
.pix-modal-overlay { /* Mantendo compatibilidade com classe antiga se necessário, mas focando na estrutura nova */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Compatibilidade com JS que usa .is-open */
.payment-modal-overlay.show,
.payment-modal-overlay.is-open,
.pix-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.payment-modal {
    background: white;
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    color: #333;
    position: relative;
    margin: auto;
    font-family: 'Montserrat', sans-serif;
}

.payment-modal-overlay.show .payment-modal,
.payment-modal-overlay.is-open .payment-modal,
.pix-modal-overlay.is-open .payment-modal {
    transform: scale(1);
}

@media (min-width: 769px) {
    .payment-modal {
        max-width: 550px;
        width: 80%;
    }
}

/* HEADER COM FOTO DE CAPA */
.payment-modal-header {
    position: relative;
    height: 140px;
    /* Ajuste de caminho para Pagina_privacy */
    background-image: url('../img/imagens/banner.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.payment-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
}

.payment-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    color: #333;
    font-size: 18px;
}

.payment-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

/* PERFIL */
.payment-profile {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    background: #fff;
}

.payment-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.payment-profile-info h3 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.payment-profile-info p {
    color: rgba(255, 255, 255, 0.9);
    margin: 2px 0 0 0;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* CORPO DO MODAL */
.payment-modal-body {
    padding: 25px;
}

/* Compatibilidade com seletor JS que busca .pix-modal__benefits */
.pix-modal__benefits,
.payment-benefits {
    margin-bottom: 25px;
}

.payment-benefits h4 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: left;
}

.payment-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.payment-benefits-list li {
    padding: 1px 0;
    padding-left: 25px;
    position: relative;
    font-size: 16px;
    color: #666;
    line-height: 1.2;
}

.payment-benefits-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #F58170;
    font-weight: bold;
    font-size: 16px;
}

/* SEÇÃO DO PLANO */
.payment-plan {
    text-align: left;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.payment-plan-label {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    text-transform: none;
    letter-spacing: normal;
}

.payment-plan-duration {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.payment-plan-price {
    color: #333;
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

/* SEÇÃO PIX */
.payment-pix {
    text-align: left;
}

.payment-pix-label {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.payment-pix-code {
    background: #f8f9fa;
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 16.8px;
    white-space: nowrap;
    overflow-x: auto;
    color: #666;
}

/* Estilo para o input se comportar como texto estático mas ser funcional */
.payment-pix-code input {
    background: transparent;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
    padding: 0;
    margin: 0;
}

.payment-copy-button {
    background: linear-gradient(45deg, #F58170, #F9AF77);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 15px rgba(245, 129, 112, 0.3);
}

.payment-copy-button:hover {
    background: linear-gradient(45deg, #FFA08A, #FFC09A);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 129, 112, 0.4);
}

.payment-copy-button:active {
    transform: translateY(0);
}

/* QR CODE */
.payment-qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border: 2px solid #eee;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.payment-qr-container img {
    max-width: 100%;
    max-height: 250px;
    width: auto;
    height: auto;
    border-radius: 10px;
    display: block;
}

/* Toast Notification (Preservado do CSS Original) */
.pix-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    white-space: nowrap;
    z-index: 10000;
}

.pix-toast.show {
    opacity: 1;
    visibility: visible;
}

/* ANIMAÇÕES */
@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-modal-body > * {
    animation: slideUp 0.4s ease-out forwards;
}

.payment-modal-body > *:nth-child(1) { animation-delay: 0.1s; opacity: 0; }
.payment-modal-body > *:nth-child(2) { animation-delay: 0.2s; opacity: 0; }
.payment-modal-body > *:nth-child(3) { animation-delay: 0.3s; opacity: 0; }
.payment-modal-body > *:nth-child(4) { animation-delay: 0.4s; opacity: 0; }

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .payment-modal {
        width: 95%;
        margin: 20px;
    }
    
    .payment-modal-header {
        height: 100px;
        padding: 15px;
    }
    
    .payment-profile-avatar {
        width: 50px;
        height: 50px;
    }
    
    .payment-profile-info h3 {
        font-size: 16px;
    }
    
    .payment-modal-body {
        padding: 20px;
    }

    .payment-plan-price {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .payment-modal {
        width: 98%;
        margin: 10px;
    }
    
    .payment-modal-header {
        height: 80px;
        padding: 10px;
    }
    
    .payment-profile {
        gap: 10px;
    }
    
    .payment-profile-avatar {
        width: 45px;
        height: 45px;
    }
    
    .payment-profile-info h3 {
        font-size: 15px;
    }
    
    .payment-modal-body {
        padding: 15px;
    }
}
