/* lead_process.css */

/* Resetação básica */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
}

/* Corpo principal */
body {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

/* Botões no topo direito */
.top-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 1001;
}

.top-button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.top-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.top-button.refresh-button {
    background-color: #17a2b8;
}

.top-button.refresh-button:hover {
    background-color: #138496;
}

.top-button.add-button {
    background-color: #28a745;
}

.top-button.add-button:hover {
    background-color: #218838;
}

/* Cartão super compacto */
.card {
    width: 95%;
    max-width: none; /* Remove a restrição se houver */
    margin: 10px auto !important; /* Centraliza o card */
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: max-height 0.5s ease, opacity 0.5s ease;
    overflow: hidden;
    position: relative;
}

/* Oculta o container de conteúdo expandido por padrão */
.card .expanded-container {
    display: none;
}

/* Exibe o container quando o card estiver expandido */
.card.expanded .expanded-container {
    display: block;
}

/* Conteúdo do card */
.card-content {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 10px;
}

.card-content .nome {
    font-size: 1.44em;
    color: #777777;
}

.card-content .sep {
    font-size: 1.4em;
    color: #666666;
}

.card-content .telefone-wrap {
    font-size: 1.17em;
    color: #777777;
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 10px;
    justify-content: flex-start;
}

.card-content .telefone-wrap a {
    text-decoration: none;
    color: #777777;
    transition: color 0.3s ease;
}

.card-content .telefone-wrap a:hover {
    color: #007bff;
}

.card-content .data-contato {
    margin-left: auto; 
    font-size: 1.1em;
    font-weight: normal;
    text-align: right;
    white-space: nowrap;
    color: #777777;
}

.contact-title {
    font-weight: bold;
    color: #999999;
    text-transform: capitalize;
}

/* Ícone PNG do WhatsApp (24x24) */
.whatsapp-icon-png {
    width: 24px;
    height: 24px;
}

/* Estilos dos Botões de Status */
.status-buttons {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Quando o card estiver expandido, mostrar os botões */
.card.expanded .status-buttons {
    max-height: 300px; /* Valor ajustável conforme o necessário */
    opacity: 1;
}

/* Botões de Status */
.status-button {
    padding: 10px 20px;
    border: 2px solid;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    outline: none;
    background-color: transparent;
}

.status-button.selected {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Botão LEAD */
.btn-lead {
    border-color: #28a745;
    color: #28a745;
}

.btn-lead.selected {
    background-color: #28a745;
    color: #fff;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.3);
}

/* Botão CLIENTE */
.btn-cliente {
    border-color: #ffc107;
    color: #ffc107;
}

.btn-cliente.selected {
    background-color: #ffc107;
    color: #fff;
    box-shadow: 0 4px 6px rgba(255, 193, 7, 0.3);
}

/* Botão DESCARTAR */
.btn-descartar {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-descartar.selected {
    background-color: #dc3545;
    color: #fff;
    box-shadow: 0 4px 6px rgba(220, 53, 69, 0.3);
}

/* Botão Salvar para CLIENTE e DESCARTAR */
.btn-save {
    padding: 10px 20px;
    background-color: #007bff; /* Azul preenchido */
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: none; /* Inicialmente oculto */
    margin-top: 15px;
}

.card.expanded .btn-save {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-save:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Formulário de Detalhes */
.card-details {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    overflow: hidden;
    margin-top: 15px;
}

.card.expanded .card-details {
    max-height: 1500px;
    opacity: 1;
}

.card-details form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Ajustando tamanhos de Código, Nome, Telefone e 1º Contato na mesma linha */
.info-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    width: 100%;
}

/* Código fixo ~105px, centralizado */
.form-field.code-field {
    flex: none; 
    width: 105px;
    display: flex;
    flex-direction: column;
}

.form-field.code-field input[type='text'] {
    text-transform: capitalize;
    text-align: center;
}

/* Nome flexível */
.form-field.name-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Telefone fixo ~210px, centralizado */
.form-field.phone-field {
    flex: none;
    width: 210px; 
    display: flex;
    flex-direction: column;
}

.form-field.phone-field input[type='text'] {
    text-align: center;
}

/* 1º Contato reduzido em 40% para 126px */
.form-field.date-field {
    flex: none;
    width: 126px;
    display: flex;
    flex-direction: column;
}

.form-field.date-field input[type='date'] {
    font-family: inherit;
    font-size: 1em;
    text-transform: capitalize;
    text-align: center;
}

/* Labels */
.label-field {
    color: #666;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.card-details input, .card-details textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    font-size: 1em; /* padrão */
    text-transform: capitalize;
}

/* Endereço maior que Região */
.nolabel.address-field {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.nolabel.regiao-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nolabel label {
    display: none;
}

.nolabel-row {
    width: 100%;
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
}

.nolabel-row .nolabel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* OBS sem label */
.obs-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.obs-container label {
    display: none;
}

.obs-container textarea {
    width: 90% !important;
    min-height: 150px;
    resize: none;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    font-size: 1em; /* Uniform font size */
    text-transform: capitalize;
}

/* Divisor */
.divider {
    display: block;
    width: 90% !important;
    margin: 10px auto;
    border-top: 1px solid #ccc;
    box-sizing: border-box;
}

/* Modal */
.modal {
    display: none; /* Oculto por padrão */
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); /* Fundo semi-transparente */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* Reduzido para 10% para centralização melhor */
    padding: 40px; /* Aumentar espaçamento interno */
    border: 1px solid #d3d3d3; /* Borda cinza clara bem fina */
    width: 85%; /* Aumentar ainda mais a largura para 85% */
    max-width: 800px; /* Aumentar o max-width */
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3); /* Sombra mais pronunciada */
}

/* Fechar Modal */
.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
}

.modal-message {
    margin-top: 20px;
    margin-bottom: 50px; /* Aumentar espaçamento */
    font-size: 1.2em;
    color: #6c757d; /* Cinza para todos os textos */
}

.modal-message .modal-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #6c757d; /* Cinza mais escuro */
    margin-bottom: 30px; /* Aumentar espaçamento */
}

.modal-message ul {
    margin-top: 30px; /* Aumentar espaçamento entre a frase e o menu */
}

.modal-message ul li {
    margin-bottom: 15px; /* Aumentar espaçamento entre itens */
}

/* Estilização para textos de Radio Buttons desabilitados */
.disabled-title {
    color: #d3d3d3; /* Cinza bem claro */
}

.disabled-phone {
    color: #d3d3d3; /* Cinza bem claro */
}

/* Botões do Modal */
.modal-button {
    padding: 12px 25px; /* Aumentar padding */
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 10px;
    color: white;
}

.modal-button.salvar {
    background-color: #28a745; /* Verde para salvar */
}

.modal-button.salvar:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.modal-button.cancelar {
    background-color: #dc3545; /* Vermelho para cancelar */
}

.modal-button.cancelar:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

/* Centralizar Botões no Modal */
#modal-buttons {
    display: flex;
    justify-content: center;
    gap: 30px; /* Aumentar gap */
}

/* Estilos para o Formulário CLIENTE */
.cliente-form {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.cliente-form input[type='text'] {
    flex: 0 0 25%; /* Aumentar largura do input */
    padding: 12px; /* Aumentar padding */
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    text-transform: capitalize;
}

.cliente-form button.btn-pesquisar {
    padding: 12px 25px; /* Aumentar padding */
    background-color: #007bff; /* Azul */
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.cliente-form button.btn-pesquisar:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* Estilos para exibir dados do cliente */
.cliente-data {
    margin-top: 20px; /* Aumentar margem */
    padding: 15px; /* Aumentar padding */
    border: 1px solid #28a745;
    border-radius: 8px;
    background-color: #e9f7ef;
}

.cliente-data p {
    margin: 8px 0; /* Aumentar margem */
    color: #333333;
}

/* Spinner */
.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Atualização Modal */
#updateModal .modal-message p {
    margin-top: 10px;
    font-size: 1.2em;
    color: #6c757d;
}

/* Estilos para conteúdo expandido */
.expanded-styles {
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 10px;
}
