#ajaxLeadsdataTable input[type="checkbox"].filled-in {
    position: initial;
    opacity: 99;
    left: auto;
}

.dataTables_filter input[type="search"] {
    margin-top: 30px;
    width: 450px !important;
}

#printModalFinanciamento, #printModalEmprestimo, #printModalImovel, #modal-contrato-imovel {
    width: 90%;
    max-width: 90%;
    max-height: 80%;
}

#modal-proposta, #modal-protocolo {
    width: 70%;
    max-width: 70%;
    max-height: 80%;
}

#modal-contrato {
    width: 90%;
    max-width: 90%;
    max-height: 80%;
}

.tool-icon {
    cursor: pointer;
}

.loading-text {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #333;
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #333;
    margin: 0 auto;
    width: 600px;
    height: 300px;
    background-image: url('../images/loading__.gif');
    background-repeat: no-repeat;
    background-position: center;
}

.error {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: red;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-position: center;
}

#togglePassword {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
}

.editable-select {
    width: 100%;
    padding: 4px;
    border: 1px solid #666;
    padding: 2px;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
    display: block;
    /* Garante que o select seja exibido como um bloco */
    height: auto;
    /* Garante que o select tenha a altura apropriada */
    visibility: visible;
    /* Garante que o select esteja visível */
}

.alert .card-content span {
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 4px;
}

.alert .card-content .material-icons {
    font-size: 1.5em;
    position: relative;
    top: 5px;
    margin-right: 0.5em;
}

.bordered {
    position: relative;
    height: 89px;
}

.bordered::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 50%;
    background-color: #c3c3c3;
}

.mailbox-list {
    position: relative;
    margin: 0 -10.5px 0 -12px;
    overflow: auto;
    background-color: #fff;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .16), 0 2px 10px 0 rgba(0, 0, 0, .12);
    min-height: 900px;
    max-height: 900px;
}

.floating-span {
    position: absolute;
    left: -155px;
    top: 65%;
    transform: translateY(-50%);
    padding: 5px;
    font-size: 16px;
}
/* Contract Template Editor Styles */
.variable-item {
    cursor: grab;
    transition: all 0.2s;
}

.variable-item:hover {
    background-color: #e9ecef;
    border-color: #007bff;
    transform: translateX(5px);
}

.variable-item:active {
    cursor: grabbing;
}

.variable-tag {
    display: inline-block;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #fbbf24;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    vertical-align: baseline;
}

.variable-tag:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
}

.variable-tag.variable-selected {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #ef4444;
    color: #991b1b;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

.contract-block {
    position: relative;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    background: #fff;
}

.contract-block:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.inciso {
    padding-left: 20px;
    margin: 5px 0;
    font-style: italic;
}

.alenea {
    padding-left: 40px;
    margin: 5px 0;
    font-size: 0.95em;
}

/* Contract Template Editor - Textarea Resize Handle */
.textarea-col-wrapper:hover .textarea-resize-handle,
.textarea-resize-handle:hover,
.textarea-resize-handle:active {
    background: rgba(59, 130, 246, 0.5) !important;
    width: 20px !important;
    left: -10px !important;
}

.textarea-resize-handle {
    background: transparent !important;
    pointer-events: auto !important;
    z-index: 100 !important;
    position: absolute !important;
}

/* Garante que a linha de textareas nunca quebre o layout */
.textarea-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
}

/* Garante que o wrapper do textarea permita overflow para o handle */
.textarea-col-wrapper > div[style*="position: relative"] {
    overflow: visible !important;
    pointer-events: auto !important;
}

/* Garante que o wrapper permita interação */
.textarea-col-wrapper {
    pointer-events: auto !important;
}

/* Previne seleção azul no TinyMCE para componentes */
.mce-content-body textarea:-webkit-autofill,
.mce-content-body textarea:-webkit-autofill:hover,
.mce-content-body textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #000;
    -webkit-box-shadow: 0 0 0px 1000px #fff inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Remove outline azul de foco do TinyMCE */
.mce-content-body [contenteditable="true"]:focus {
    outline: none;
}

.mce-content-body .textarea-col:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Garante que componentes de assinatura tenham posição relativa */
.contract-signature {
    position: relative !important;
}

.contract-signature .signature-item {
    position: relative !important;
}

.contract-signature .signature-container {
    position: relative !important;
}
