/* assets/css/style.css */

.chatzap-icon-wrapper:before {
    content: "1";
    position: absolute;
    min-width: 2em;
    height: 2em;
    line-height: 2;
    /* border: 1px solid; */
    top: -.7em;
    right: -.5em;
    border-radius: 100%;
    color: #fff;
    background-color: #cf1635;
    text-align: center;
    font-size: 10px;
    animation: pulse-red 1.5s infinite;
    z-index: 3;
}

/* Estilos para o botão completo [chatzap] */
.chatzap-whatsapp-link,
.chatzap-whatsapp-webhook,
.cww-agent-button-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: white;
    padding: 5px 15px 5px 10px;
    border-radius: 25px;
    background-color: #25d366;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chatzap-whatsapp-link:hover,
.chatzap-whatsapp-webhook:hover {
    background-color: #1da851;
}

.chatzap-button-image,
img.cww-agent-icon-only-image {
    width: 28px;
    height: 28px;
    border-radius: 100% !important;
    object-fit: cover;
}

.chatzap-button-text {
    line-height: 1;
    font-weight: bold;
}

/* Estilos para o shortcode [chatzap_icone] */
.chatzap-icon-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    /* Indica que é clicável */
}

.chatzap-whatsapp-icon-link,
.chatzap-whatsapp-icon-webhook {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background-color 0.3s ease;
    position: relative;
    z-index: 2;
}

.chatzap-whatsapp-icon-link:hover,
.chatzap-whatsapp-icon-webhook:hover {
    transform: scale(1.05);
    background-color: #1da851;
}

.chatzap-icon-only-image {
    width: 100%;
    height: 100%;
    border-radius: 100px !important;
    object-fit: cover;
}

/* Estilos do Popover */
.chatzap-popover {
    position: absolute;
    right: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    color: #333;
    padding: 10px 15px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, right 0.3s ease;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Estado visível do popover */
.chatzap-popover.visible {
    opacity: 1;
    visibility: visible;
    right: calc(100% + 20px);
    /* Leve movimento para a direita ao aparecer */
}

.chatzap-popover-arrow {
    position: absolute;
    left: 93%;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 15px;
    height: 15px;
    background-color: #fff;
    box-shadow: 20px 0px 20px 0px rgb(0 0 0 / 40%);
    z-index: -1;
}

.chatzap-popover-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    position: relative;
    /* Para posicionar o X */
    z-index: 1;
}

.chatzap-popover-robot-icon {
    font-size: 1.2em;
    line-height: 1;
    margin-left: 5px;
}

.chatzap-popover-close {
    position: absolute;
    top: -15px;
    left: -20px;
    background: none;
    border: none;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 5px;
    transition: color 0.2s ease;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    background: #fff;
    border-radius: 100px;
    line-height: 15px;
}

.chatzap-popover-close:hover {
    opacity: 1;
}

/* Sem necessidade de .chatzap-popover-content .chatzap-popover-text com esta abordagem */

/* Estilos para o Modal de Solicitação de Telefone */
.cww-modal-overlay {
    display: none;
    /* Inicia oculto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    /* Fundo semi-transparente escuro */
    z-index: 99999;
    /* Garante que fique acima de tudo */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
    /* Adicionado backdrop-filter na transição */
    backdrop-filter: blur(0px);
    /* Inicia sem blur */
}

.cww-modal-overlay.active {
    display: flex;
    /* Torna visível */
    opacity: 1;
    backdrop-filter: blur(5px);
    /* Aplica o blur quando ativo */
}

.cww-modal-content {
    background-color: #fff;
    /* Fundo branco */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    /* Largura máxima */
    width: 90%;
    transform: scale(0.7);
    /* Começa menor para o zoom-in */
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.4s ease;
    /* Efeito de mola para o zoom */
    opacity: 0;
    position: relative;
    /* Para posicionar o botão de fechar */
}

.cww-modal-overlay.active .cww-modal-content {
    transform: scale(1);
    /* Zoom-in para o tamanho normal */
    opacity: 1;
}

/* Adicionando uma classe para o efeito de zoom-out ao fechar */
.cww-modal-overlay.closing .cww-modal-content {
    transform: scale(0.7);
    /* Zoom-out */
    opacity: 0;
}

.cww-modal-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.cww-modal-close-button:hover {
    color: #333;
}

.cww-modal-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 25px;
}

.cww-modal-description {
    font-size: 0.95em;
    margin-top: -10px;
    color: #666;
    margin-bottom: 20px;
}

.cww-phone-input {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #ddd !important;
    border-radius: 5px;
    font-size: 1.1em;
    text-align: center;
    box-sizing: border-box;
}

.cww-phone-input:focus {
    outline: none;
    border-color: #25d366 !important;
}

.cww-modal-error-message {
    font-size: 0.9em;
    min-height: 1.2em;
    /* Garante espaço mesmo sem mensagem */
}

.cww-modal-button,
.cww-modal-open-whatsapp-error,
.cww-modal-close-error {
    background-color: #25d366;
    /* Cor do WhatsApp */
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: auto;
    /* Ajusta a largura ao conteúdo */

}

.cww-modal-button:hover {
    background-color: #1da851;
    transform: translateY(-1px);
}

/* Estilos para os botões de erro */
.cww-modal-error-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    /* Espaço acima dos botões */
}

.cww-modal-open-whatsapp-error,
.cww-modal-close-error {
    background-color: #25d366;
    /* Cor para o botão de abrir WhatsApp em erro */
    color: white;
}

.cww-modal-close-error {
    background-color: #6c757d;
    /* Cinza para "Não Abrir" */
}

.cww-modal-open-whatsapp-error:hover {
    background-color: #28a745;
}

.cww-modal-close-error:hover {
    background-color: #000;
}

.cww-modal-thank-you {
    background-color: #28a745;
    color: white;
    margin-top: 10px;
}

.hidden {
    display: none !important;
}