.whatsapp-button {
    position: fixed;
    bottom: -5px;
    right: 0px;
    width: 110px;
    height: 102px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9991;
    transition: all 0.3s ease;
    border: none;
    background: none;
    padding: 0;
}

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

.whatsapp-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Botão WhatsApp */
.btn_whatsapp {
    display: block !important;
}

.btn_whatsapp a {
    background-image: url(https://datapericias.com.br/assets/img/icon_whatsapp.png);
    background-repeat: no-repeat;
    background-size: cover;
    width: 95px;
    height: 95px;
    position: fixed;
    right: 10px;
    bottom: 10px;
    cursor: pointer;
    z-index: 9998;
    display: block;
}

/* Chat */
.chat-box {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background-color: #ececec;
    border-radius: 12px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.chat-header {
    background-color: #4ac15a;
    color: #ffffff;
    padding: 10px 12px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.chat-body {
    padding: 10px;
    padding-bottom: 12px;
    max-height: 330px;
    overflow-y: auto;
    font-size: 14px;
}

.chat-footer {
    padding: 10px;
    text-align: right;
    background-color: #e4e4e4;
}

.chat-footer button,
.chat-box .chat-footer button {
    background-color: #4ac15a;
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.bot-message,
.chat-box .bot-message {
    background-color: #1f232b;
    color: #ffffff;
    border-radius: 15px;
    margin-bottom: 8px;
    max-width: 90%;
    word-wrap: break-word;
    padding: 10px;
    font-size: 14px;
    line-height: 1.3;
}

.input-chat,
.chat-box .input-chat {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #c8c8c8;
    border-radius: 8px;
    box-sizing: border-box;
    background-color: #ffffff !important;
    color: #1b1b1b !important;
    font-size: 16px;
}

.input-chat:focus,
.chat-box .input-chat:focus {
    outline: none;
    border-color: #4ac15a;
}

.hidden,
.chat-box .hidden {
    display: none !important;
}

.button-disabled,
.chat-box .button-disabled {
    background-color: #b7b7b7 !important;
    cursor: not-allowed !important;
}

.chat-status {
    margin-top: 8px;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
}

.chat-status-success {
    background-color: #d8f6dc;
    color: #175e22;
}

.chat-status-error {
    background-color: #ffe2e2;
    color: #8b1f1f;
}

/* Inputs */
.user-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#serviceType {
    width: 100% !important;
}

/* Botões */
.btn-submit {
    background-color: #00ff9d !important;
    color: #070b12 !important;
    border-color: #00ff9d !important;
    width: 100% !important;
    margin-top: 10px !important;
    font-weight: 600 !important;
}

.btn-submit:hover {
    background-color: #0bcb81 !important;
    color: #070b12 !important;
    border-color: #0bcb81 !important;
}

#sendBtn {
    min-width: 120px;
}

/* Utilidades */
.mb-5 {
    margin-bottom: 5px !important;
}

.mb-10 {
    margin-bottom: 10px !important;
}

.mt-5 {
    margin-top: 5px !important;
}

.mt-10 {
    margin-top: 10px !important;
}

.return-msg {
    margin-top: 10px;
    text-align: center;
}

/* Formulário telefone */
.phone-container,
.form-group.phone-container,
#phoneContainer {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: center;
    box-sizing: border-box;
}

.contact-form .col-sm-12 .form-group {
    margin-bottom: 5px;
}

.form-group.phone-container select {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    padding: 0;
    flex: none;
    border-radius: 5px 0 0 5px;
    text-align: center;
    box-sizing: border-box;
    background-color: #171A30 !important;
    color: #ffffff !important;
    border-color: #F8F8F82B;
    appearance: none;
}

.form-group.phone-container select option {
    background-color: #171A30 !important;
    color: #ffffff !important;
}

.form-group.phone-container input[type="tel"] {
    flex: 1;
    width: auto;
    margin-bottom: 0;
    border-radius: 0 5px 5px 0;
    box-sizing: border-box;
    color: white;
}

.form-group.phone-container input[type="tel"]::placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #ffffff !important;
}

#ddiPhone {
    width: 52px;
    padding: 6px 8px;
    text-align: center;
}

#dddPhone {
    width: 70px;
    padding: 8px;
    text-align: center;
    border: none;
    border-radius: 5px;
    font-size: 0.8rem;
}

#chatPhone {
    flex: 1;
    padding: 6px 8px;
    min-width: 80px;
    box-sizing: border-box;
}

/* Campos específicos */
#serviceArea {
    width: 100%;
    min-height: 120px;
    max-height: 240px;
    resize: vertical;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    line-height: 1.3;
    background-color: #ffffff;
    color: #070b12;
}

#chatName,
#chatPhone,
#chatEmail,
#ddiPhone,
#dddPhone,
#serviceType {
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #ffffff !important;
    color: #070b12 !important;
    font-size: 14px;
    margin-bottom: 10px;
}

#serviceArea.input-chat {
    background-color: #ffffff !important;
}

#phoneContainer .input-chat,
#serviceArea.input-chat {
    background-color: #fff !important;
    color: #070b12 !important;
}

/* Estado erro */
#serviceArea[style*="2px solid #dc3545"],
#chatPhone[style*="2px solid #dc3545"] {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.08);
}

/* Responsivo */
@media (max-width: 991px) {
    .chat-box {
        right: 10px;
        bottom: 105px;
    }

    .btn_whatsapp,
    .btn_whatsapp a {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .phone {
        width: 90% !important;
    }
}
