/* --- Estrutura Principal do Popup (Padrão: Mobile Centralizado) --- */
.hrp-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%; /* Centraliza horizontalmente */
    transform: translateX(-50%); /* Ajuste fino para centralização exata */
    width: calc(100% - 40px); /* Garante margem de 20px em cada lado */
    max-width: 360px; /* Largura máxima do popup */
    animation: hrp-slideIn 0.5s ease-in-out;
    z-index: 100000;
    box-sizing: border-box;
}

/* --- Ajuste para Desktop (Canto Esquerdo) --- */
/* Quando a tela for maior que 768px (tablets/desktops) */
@media (min-width: 769px) {
    .hrp-popup {
        left: 20px; /* Posição a 20px da esquerda */
        right: auto; /* Remove a regra 'right' se houver */
        transform: none; /* Remove a centralização */
        width: 360px; /* Define uma largura fixa */
    }
}

.hrp-popup-content {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
}

/* --- Cabeçalho com Imagem e Texto --- */
.hrp-popup-header {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
}

.hrp-listing-image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.hrp-popup-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.hrp-popup-content h3 {
    font-size: 16px;
    color: #111;
    margin: 0;
    font-weight: bold;
    line-height: 1.3;
    word-wrap: break-word;
}

.hrp-popup-subtitle {
    font-size: 14px;
    color: #555;
    margin: 4px 0 0 0;
    word-wrap: break-word;
}

/* --- Botão e Cores Dinâmicas --- */
.hrp-popup-button {
    display: block;
    text-align: center;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

/* Cores (sem alteração) */
.popup-anuncio .hrp-popup-button { background: #2196F3; }
.popup-anuncio .hrp-popup-button:hover { background: #1976D2; }
.popup-cupons .hrp-popup-button { background-color: #FF9800; }
.popup-cupons .hrp-popup-button:hover { background-color: #F57C00; }
.popup-aluguel .hrp-popup-button { background-color: #4CAF50; }
.popup-aluguel .hrp-popup-button:hover { background-color: #388E3C; }

/* --- Botão de Fechar --- */
.hrp-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.hrp-popup-close:hover {
    color: #333;
}

/* --- Animação de Entrada --- */
/* Esta animação única funciona para ambos os casos (mobile e desktop) */
@keyframes hrp-slideIn {
    from {
        transform: translateY(120px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
