/* =============================================
   BOTÃO FLUTUANTE TELEFÔNICO (pill)
   Visível apenas em celular e tablet (≤ 1024px)
   ============================================= */

.tel-btn-wrapper {
    display: none; /* oculto por padrão — ativado por media query */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

@media (max-width: 1024px) {
    .tel-btn-wrapper {
        display: inline-flex;
    }
}

.tel-btn {
    display: inline-flex !important;
    padding: 2px 2px !important;
    align-items: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.tel-btn-rounded {
    border-radius: 50px;
}

.tel-btn-square {
    border-radius: 8px;
}

.tel-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.32);
}

.tel-btn-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tel-btn-label {
    padding: 0 14px 0 8px;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    white-space: nowrap;
    line-height: 36px;
}

.tel-tooltip {
    visibility: hidden;
    opacity: 0;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    position: absolute;
    bottom: 68px;
    right: 0;
    white-space: nowrap;
    font-size: 13px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: normal !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.tel-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 18px;
    border: 6px solid transparent;
    border-top-color: #333;
}

.tel-btn-wrapper:hover .tel-tooltip {
    visibility: visible;
    opacity: 1;
}

#telNumberChooser {
    position: fixed;
    bottom: 95px;
    right: 20px;
    z-index: 10000;
    width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.tel-wzc-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}

.tel-wzc-item:last-child {
    margin-bottom: 0;
}

.tel-wzc-item:hover {
    background: #f0f4ff;
}

/* ============================================= */

/* Wrapper posiciona o botão e o tooltip */
.whatsapp-btn-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: inline-block;
}

.whatsapp-btn {
    position: relative !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    display: block;
    transition: transform 0.2s;
}

.whatsapp-btn img {
    max-width: 64px;
    max-height: 64px;
    display: block;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* Tooltip */
.whatsapp-tooltip {
    visibility: hidden;
    opacity: 0;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    position: absolute;
    bottom: 74px;
    right: 0;
    white-space: nowrap;
    font-size: 13px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: normal !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 18px;
    border: 6px solid transparent;
    border-top-color: #333;
}

.whatsapp-btn-wrapper:hover .whatsapp-tooltip {
    visibility: visible;
    opacity: 1;
}

/* =============================================
   POPUP SELETOR DE NÚMERO (modo direto)
   Aparece acima do botão flutuante
   ============================================= */

#whatsappNumberChooser {
    position: fixed;
    bottom: 95px;
    right: 20px;
    z-index: 10000;
    width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.wzc-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    overflow: hidden;
}

.wzc-header {
    background-color: #009E8A;
    color: #fff;
    padding: 14px 16px;
    font-size: 15px !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.wzc-header span {
    flex: 1;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1.3 !important;
}

.wzc-close {
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 22px !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    flex-shrink: 0;
    margin-left: 8px;
}

.wzc-list {
    padding: 8px;
    background: #f2f2f2;
}

.wzc-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
    text-decoration: none !important;
}

.wzc-item:last-child {
    margin-bottom: 0;
}

.wzc-item:hover {
    background: #e8f5f3;
}

.wzc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #d0ece8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    color: #009E8A !important;
    flex-shrink: 0;
}

.wzc-info {
    flex: 1;
    min-width: 0;
}

.wzc-titulo {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #222 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wzc-numero {
    font-size: 12px !important;
    color: #777 !important;
    margin-top: 2px;
}

.wzc-arrow {
    color: #aaa !important;
    font-size: 14px !important;
    flex-shrink: 0;
}

/* =============================================
   SELEÇÃO DE NÚMERO NO MODAL FORMULÁRIO
   ============================================= */

#numberSelectSection {
    background-color: #E9E9E9 !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

.wzm-num-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px !important;
}

.wzm-num-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}

.wzm-num-item:hover {
    background: #e8f5f3;
}

.wzm-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #d0ece8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
    color: #009E8A !important;
    flex-shrink: 0;
}

.wzm-info {
    flex: 1;
    min-width: 0;
}

.wzm-titulo {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #222 !important;
}

.wzm-numero {
    font-size: 12px !important;
    color: #777 !important;
    margin-top: 2px;
}

.wzm-arrow {
    color: #aaa !important;
    font-size: 14px !important;
    flex-shrink: 0;
}

/* Badge do número selecionado */
#selectedNumberBadge {
    background: #f0f9f6 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    border: 1px solid #d0ece8 !important;
}

#selectedNumberBadge:hover {
    background: #e8f5f3 !important;
}

/* =============================================
   POPUP WHATSAPP - ESTILOS ISOLADOS
   Todos os seletores usam #whatsappModal como
   raiz para evitar interferência de temas.
   ============================================= */

#whatsappModal .modal-dialog {
    max-width: 400px !important;
}

#whatsappModal .modal-content {
    border-radius: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

#whatsappModal .modal-content * {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

#whatsappModal .modal-content:not(.wz-tel-modal) .modal-header {
    background-color: #009E8A !important;
    height: 65px !important;
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

#whatsappModal .modal-body {
    padding: 0 !important;
}

#whatsappModal #formSection {
    background-color: #E9E9E9 !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

#whatsappModal .form-control {
    background-color: #ffffff !important;
    border: none !important;
    color: #000 !important;
    box-shadow: none !important;
    height: 40px !important;
    padding: 10px 10px 10px 2.5rem !important;
    font-size: 14px !important;
    border-radius: 50px !important;
    outline: none !important;
    width: 100% !important;
    display: block !important;
}

#whatsappModal .form-control::placeholder {
    color: #5C5C5C !important;
    opacity: 1 !important;
}

#whatsappModal .form-control:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

#whatsappModal .modal-content:not(.wz-tel-modal) #btnEnviar,
#whatsappModal .modal-content:not(.wz-tel-modal) .btn-success {
    background-color: #00D05F !important;
    border: none !important;
    font-weight: bold !important;
    color: #fff !important;
    border-radius: 50px !important;
    width: 100% !important;
    padding: 0.5rem 1rem !important;
    font-size: 14px !important;
    cursor: pointer !important;
    display: block !important;
}

#whatsappModal .modal-content:not(.wz-tel-modal) #btnEnviar:hover,
#whatsappModal .modal-content:not(.wz-tel-modal) .btn-success:hover {
    background-color: #00b552 !important;
}

#whatsappModal .modal-content:not(.wz-tel-modal) #whatsappForm .bi {
    color: #00D05F !important;
}

#whatsappModal .modal-close-x {
    background: none !important;
    border: none !important;
    color: #000 !important;
    font-size: 32px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 18px 0 0 !important;
    margin-left: auto !important;
    box-shadow: none !important;
}

#whatsappModal .voltar-button {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 0.5rem 1rem !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

#whatsappModal .thank-you {
    background-color: #F4F4F4 !important;
    padding: 30px !important;
    text-align: center !important;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}

#whatsappModal .text-danger {
    color: #dc3545 !important;
    font-size: 12px !important;
    margin-top: 4px !important;
    display: block !important;
}

#whatsappModal .honeypot-field {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}
