/* Bloco 1: Classes dos elementos HTML */
::-webkit-scrollbar {
    background: #f4f4f4;
    border-radius: 10px;
    height: 12px;
    width: 12px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3498db, #5dade2);
    border: 2px solid #f4f4f4;
    border-radius: 10px;
    transition: background 0.07s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2980b9, #1f618d);
}

::-webkit-scrollbar-track {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

::-webkit-scrollbar-corner {
    background: #f4f4f4;
}

a:hover {
    transition: ease 0.25s;
}

footer.sticky-footer {
    background-color: rgba(7, 40, 109, 1) !important;
    bottom: 0;
    display: flex;
    font-weight: bold;
    height: 5vh;
    padding: 0.5rem !important;
    position: absolute;
    right: 0;
    text-align: center;
    width: 100%;
}

footer.sticky-footer div {
    font-size: 0.875rem;
    line-height: 1;
}

footer.sticky-footer div a {
    opacity: 0.75;
}

footer.sticky-footer div a:hover {
    opacity: 1;
}

hr.horizontal.gray-light {
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}

input {
    padding-left: 6px !important;
    padding-right: 6px !important;
}

input[readonly] {
    background-color: var(--bs-gray-100) !important;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    display: none;
}

input[type="datetime-local"]::-moz-calendar-picker-indicator {
    display: none;
}

input:disabled,
textarea:disabled {
    background-color: #f5f5f5 !important;
}

select {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Bloco 2: Classes com IDs */
#id_attendants,
#id_attendants_assign,
#id_attendants_unassign,
#id_coords {
    height: 15rem !important;
}

#list-leads {
    border-bottom: 2px solid #ccc !important;
}

#nav-top,
#nav-top>li>a {
    color: #fff;
    opacity: .7;
}

#nav-top>li>a:hover {
    opacity: 1;
    transition: ease 0.25s;
}

/* Bloco 3: Classes padrão */
.a-swap {
    background-color: #e91e63;
    border: 2px solid white;
    border-radius: 30px;
    height: 50px;
    width: 50px;
}

.a-swap-next-container,
.a-swap-previous-container {
    bottom: 0;
    height: 50px;
    margin: auto;
    position: absolute;
    top: 0;
}

.a-swap-next-container {
    right: -12px;
}

.a-swap-previous-container {
    left: -12px;
}

@media screen and (max-width: 1200px) {

    .a-swap-next-container,
    .a-swap-previous-container {
        position: fixed;
    }

    .a-swap-next-container {
        right: 0px;
    }

    .a-swap-previous-container {
        left: 0px;
    }
}

.bg-gradient-primary-custom {
    background-image: linear-gradient(195deg, #f29822 0%, #ff9100 100%);
}

.bg-primary-custom {
    background-color: #07286D !important;
}

.blur {
    -webkit-backdrop-filter: saturate(100%) blur(16px) !important;
    backdrop-filter: saturate(100%) blur(16px) !important;
    background-color: hsl(221, 88%, 23%) !important;
    box-shadow: inset 0 0 2px hsla(0, 0%, 100%, .9) !important;
    color: #fff;
    opacity: .9;
}

.blur>div>div>a>div {
    color: #fff !important;
}

.border-left-danger {
    border-left: 12px solid var(--bs-primary);
}

.border-left-success {
    border-left: 12px solid var(--bs-success);
}

.breadcrumb-item.active {
    color: #e0e0e0 !important;
}

.btn-light:not(:disabled):not(.disabled):active {
    color: var(--bs-primary) !important;
}

#btn-custom {
    border: 1px solid transparent;
    box-shadow: none;
    transition: all 0.07s ease-in-out;
}

#btn-custom:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: #fff;
}

#btn-custom:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

#btn-custom:active {
    background-color: var(--bs-primary-dark);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: scale(0.99);
}

#btn-custom .material-icons {
    transition: transform 0.07s ease-in-out, color 0.07s ease-in-out;
}

#btn-custom:hover .material-icons {
    transform: rotate(-20deg);
}

.container-list {
    height: 15rem !important;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .dropdown .dropdown-menu:before {
        content: "↑" !important;
        font-size: 30px !important;
    }
}

.dropdown-item {
    align-items: center;
    background-color: #ffffff;
    border: 1px solid transparent;
    border-radius: 4px;
    color: inherit;
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    transition: all 0.07s ease-in-out;
}

.dropdown-item:hover {
    background: var(--bs-primary);
    border-color: #ced4da;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    color: var(--bs-light) !important;
    transform: translateY(-2px);
}

.dropdown-item:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.dropdown-item:active {
    background-color: #dee2e6;
    border-color: #adb5bd;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--bs-primary);
    transform: translateY(2px);
}

.dropdown-item .material-icons {
    font-size: 20px;
    transition: transform 0.07s ease-in-out, color 0.07s ease-in-out;
}

.dropdown-item span {
    transition: transform 0.07s ease-in-out, color 0.07s ease-in-out;
}

.dropdown-item:hover .material-icons {
    color: var(--bs-light);
    transform: rotate(-5deg) scale(1.1);
}

.fade-out {
    animation: fadeOut 1s ease-in-out;
    opacity: 0;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.file-upload-custom {
    border-radius: 0.5rem !important;
    font-size: small;
    margin-bottom: 0px;
    padding: 0.125rem;
    width: 100%;
}

.file-upload-custom::-webkit-file-upload-button {
    background: #1a73e8;
    border: transparent;
    border-radius: 0.5rem;
    border-width: 1px;
    color: white;
    cursor: pointer;
    font-size: small;
    font-weight: 700;
    padding: 0.4rem 0.96rem;
    transition: all .15s ease-in;
}

.form-check {
    margin-bottom: 0rem !important;
    padding-left: 0em !important;
}

.form-check:not(.form-switch) .form-check-input[type=checkbox]:after {
    content: "\e5ca" !important;
    font-family: "Material Icons Round" !important;
    font-size: 1rem !important;
}

.form-check-input {
    margin-top: -0.135em !important;
}

.form-switch .form-check-input {
    margin-left: 3em !important;
    margin-top: -1em !important;
}

.form-switch .form-check-input:checked {
    background-color: #1a73e8 !important;
    border-color: #1a73e8 !important;
}

.footer {
    z-index: 9999;
}

.iframe-custom {
    border: none;
    border-radius: 10px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.14), 0px 7px 10px -5px rgba(0, 0, 0, 0.4);
    height: 75vh;
    width: 100%;
}

.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu) {
    border-bottom-right-radius: 0rem !important;
    border-top-right-radius: 0rem !important;
}

.list-group-item {
    border-radius: 15px !important;
}

.list-group-item-contact {
    border-radius: 0px !important;
}

.menu-container {
    flex-grow: 1;
    max-height: calc(100vh - 150px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-color: rgba(255, 255, 255, 0.23) transparent;
    scrollbar-width: thin;
}

.menu-container::-webkit-scrollbar {
    width: 6px;
}

.menu-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}

.navbar-footer-brand-img {
    height: 22px;
    width: 100%;
}

.navbar-vertical .navbar-nav .nav-link[data-bs-toggle=collapse]:after {
    content: "\e5cf" !important;
    font-family: "Material Icons Round" !important;
}

.page-item.active .page-link {
    color: #fff !important;
}

.sidenav-footer {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.33);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    font-size: 1rem;
    justify-content: center;
    padding: 0.5rem !important;
    position: relative;
    text-align: center;
}

.sidenav-footer a {
    align-items: center;
    display: flex;
    justify-content: center;
    text-decoration: none;
}

.sidenav-header {
    text-align: center !important;
}

.offcanvas-body {
    overflow-y: auto;
}

.offcanvas-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.text-truncate-lg {
    max-width: 660px;
}

.text-truncate-md {
    max-width: 430px;
}

.text-truncate-sm {
    max-width: 230px;
}

.text-truncate-xs {
    max-width: 80px;
}

.text-truncate-lg,
.text-truncate-md,
.text-truncate-sm,
.text-truncate-xs {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toggle-password {
    border: 1px solid #d2d6da !important;
}

.tooltip-custom {
    z-index: 99999 !important;
}

.tooltip-custom .tooltip-inner {
    z-index: 99999 !important;
}

.tooltip-custom .tooltip-arrow {
    z-index: 99999 !important;
}

#sidenav-main {
    z-index: 1030;
}

.modal-open #sidenav-main {
    z-index: 1020;
}

.main-container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.lead-notification-icon {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.lead-notification-icon:hover {
    transform: scale(1.1);
}

.icon-container {
    position: relative;
    width: 50px;
    height: 50px;
    background: #1a73e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.icon-container:hover {
    background: #1557b0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.icon-container i {
    color: white;
    font-size: 24px;
}

.status-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid white;
    transition: background-color 0.3s ease;
}

.status-dot.connected {
    background: #4caf50;
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background: #f44336;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

@keyframes notification-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.lead-history-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    max-height: 400px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.lead-history-panel.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.history-header {
    background: #1a73e8;
    color: white;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.history-content {
    max-height: 300px;
    overflow-y: auto;
}

.log-content {
    padding: 12px 16px;
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: #666;
    font-size: 11px;
    font-weight: 500;
}

.log-message {
    color: #333;
    margin-top: 2px;
    line-height: 1.4;
}

.notification-custom {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px;
    border-radius: 5px;
    z-index: 10000;
    max-width: 300px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.import-modal .modal-content {
    border-radius: 1rem;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.14), 0px 7px 10px -5px rgba(0, 0, 0, 0.4);
    border: none;
}

.import-modal .modal-header {
    background: linear-gradient(195deg, #07286D 0%, #1a73e8 100%);
    color: white;
    border-radius: 1rem 1rem 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.import-modal .modal-title {
    font-weight: 600;
    color: white;
}

.import-modal .modal-body {
    padding: 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
}

.import-modal .modal-body::-webkit-scrollbar {
    background: #f4f4f4;
    border-radius: 10px;
    width: 8px;
}

.import-modal .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #07286D, #1a73e8);
    border-radius: 10px;
    transition: background 0.07s ease;
}

.import-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #052152, #1557b0);
}

.import-modal .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.import-modal .nav-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 0.5rem 0.5rem 0 0;
    color: #6c757d;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.25s ease;
    position: relative;
}

.import-modal .nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #e9ecef;
    color: #07286D;
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.import-modal .nav-tabs .nav-link.active {
    color: #07286D;
    background-color: #fff;
    border-color: #e9ecef #e9ecef #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.import-modal .nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #07286D 0%, #1a73e8 100%);
    border-radius: 2px 2px 0 0;
}

.import-modal .tab-content {
    min-height: auto;
}

.import-modal .tab-pane {
    padding: 0;
    display: none !important;
}

.import-modal .tab-pane.show.active {
    display: block !important;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.import-modal .tab-pane:not(.show):not(.active) {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.import-modal .tab-pane.fade:not(.show) {
    height: 0 !important;
    min-height: 0 !important;
}

.import-modal .card {
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
}

.import-modal .card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.import-modal .table-responsive {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 0.5rem;
}

.import-modal .table-responsive::-webkit-scrollbar {
    background: #f4f4f4;
    border-radius: 10px;
    width: 6px;
}

.import-modal .table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #07286D, #1a73e8);
    border-radius: 10px;
}

.import-modal .table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.import-modal .table thead {
    background: linear-gradient(195deg, #f8f9fa 0%, #e9ecef 100%);
}

.import-modal .table tbody tr:hover {
    background-color: rgba(26, 115, 232, 0.05);
}

@media (max-width: 768px) {
    .import-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .import-modal .modal-header,
    .import-modal .modal-body {
        padding: 1rem;
    }

    .import-modal .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .import-modal .card {
        margin-bottom: 1rem;
    }
}

/* Melhorias para tooltips */
.tooltip {
    pointer-events: none !important;
    z-index: 1070 !important;
}

.tooltip.fade {
    transition: opacity 0.15s linear !important;
}

.tooltip.show {
    opacity: 0.9 !important;
}

/* Garante que tooltips órfãos sejam removidos */
.tooltip:not(.show) {
    display: none !important;
}

/* Status dots animados */
.status-dot {
    animation: none;
    transition: all 0.3s ease;
}

.status-dot.connected {
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Indicador de status - dot animado */
.status-indicator {
    position: relative;
    display: inline-block;
}

.status-indicator.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: rgba(25, 135, 84, 0.2);
    border-radius: 50%;
    animation: status-pulse-soft 2s infinite;
}

@keyframes status-pulse-soft {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
}