/* =====================================================
   Personal Car Silva - Formulário Flutuante de Leads
   Otimizado para Tráfego Pago & Design Automotivo de Luxo
   ===================================================== */

/* Container Principal Flutuante - Desktop */
#lead_floating_widget {
    position: fixed;
    right: 65px; /* Alinhado ao lado esquerdo dos botões fixos (50px largura) */
    top: 170px;
    width: 325px;
    z-index: 9998;
    background: rgba(20, 20, 24, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(252, 127, 44, 0.4);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(252, 127, 44, 0.15);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Cabeçalho do Widget */
.lead-widget-header {
    background: linear-gradient(180deg, rgba(35, 35, 42, 0.9) 0%, rgba(20, 20, 24, 0.9) 100%);
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lead-widget-title-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lead-widget-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(252, 127, 44, 0.15);
    border: 1px solid rgba(252, 127, 44, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FC7F2C;
    font-size: 14px;
}

.lead-widget-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.lead-widget-subtitle {
    margin: 0;
    font-size: 11px;
    color: #a0a0a8;
    line-height: 1.2;
}

/* Botão de Fechar / Minimizar */
.lead-widget-close {
    background: none;
    border: none;
    color: #888892;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.lead-widget-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Corpo do Formulário */
.lead-widget-body {
    padding: 16px;
}

.lead-form-group {
    margin-bottom: 11px;
}

.lead-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #d0d0d8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lead-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    padding: 9px 12px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lead-input:focus {
    outline: none;
    border-color: #FC7F2C;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(252, 127, 44, 0.2);
}

.lead-input::placeholder {
    color: #72727c;
    font-size: 12px;
}

textarea.lead-input {
    resize: none;
}

/* Botão de Envio */
.btn-lead-submit {
    width: 100%;
    margin-top: 6px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #FC7F2C 0%, #d86214 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(252, 127, 44, 0.35);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-lead-submit:hover {
    background: linear-gradient(135deg, #ff8e43 0%, #e66817 100%);
    box-shadow: 0 6px 20px rgba(252, 127, 44, 0.5);
    transform: translateY(-1px);
}

.btn-lead-submit:active {
    transform: translateY(0);
}

.btn-lead-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Mensagem de Feedback */
#lead_floating_results {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
    display: none;
}

#lead_floating_results.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: #4cd988;
}

#lead_floating_results.alert-danger {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #ff6b6b;
}

/* =====================================================
   Botão Flutuante (Canto Inferior Direito quando fechado)
   Sem botão fechar acoplado - puramente ação de abertura
   ===================================================== */
#lead_floating_trigger {
    display: none; /* Exibido quando o formulário estiver fechado */
    position: fixed;
    bottom: 28px;
    right: 100px; /* Posicionado perfeitamente ao lado do botão circular de WhatsApp */
    z-index: 9998;
    background: linear-gradient(135deg, #FC7F2C 0%, #c45d18 100%);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(252, 127, 44, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    align-items: center;
    gap: 9px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pulseLead 2.8s infinite;
}

#lead_floating_trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(252, 127, 44, 0.5);
    color: #ffffff;
}

#lead_floating_trigger i {
    font-size: 15px;
}

@keyframes pulseLead {
    0% {
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(252, 127, 44, 0.6);
    }
    70% {
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 0 12px rgba(252, 127, 44, 0);
    }
    100% {
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(252, 127, 44, 0);
    }
}

/* =====================================================
   Backdrop Overlay para Mobile
   ===================================================== */
#lead_floating_backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
}

/* =====================================================
   Adaptação Mobile - Formulário Centralizado na Tela
   ===================================================== */
@media (max-width: 767px) {
    /* No mobile inicia fechado, abrindo centralizado */
    #lead_floating_widget {
        display: none;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: 92%;
        max-width: 380px;
        max-height: 88vh;
        overflow-y: auto;
        z-index: 10001;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(252, 127, 44, 0.25);
    }

    /* No mobile o botão flutuante fechado fica acima do botão circular de WhatsApp */
    #lead_floating_trigger {
        display: flex;
        bottom: 142px;
        right: 18px;
        padding: 10px 18px;
        font-size: 12.5px;
    }
}
