/* Modal de Compra de Rifa - CSS Limpo */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
    backdrop-filter: blur(4px);
    visibility: hidden;
    opacity: 0;
}

.modal-overlay.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.buy-modal {
    background: var(--secondary-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 100000;
    margin: auto;
}

.buy-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-blue);
    color: var(--text-primary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.buy-modal .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.buy-modal .modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.buy-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.buy-modal .modal-body {
    padding: 1.5rem;
}

.buy-modal .modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: var(--primary-bg);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.buy-modal .modal-footer .btn {
    min-width: 120px;
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.5rem;
    }
    
    .buy-modal {
        max-width: 100%;
        margin: 0;
    }
    
    .buy-modal .modal-header,
    .buy-modal .modal-body,
    .buy-modal .modal-footer {
        padding: 1rem;
    }
    
    .buy-modal .modal-footer {
        flex-direction: column;
    }
    
    .buy-modal .modal-footer .btn {
        width: 100%;
        min-width: auto;
    }
}
