﻿/* ===============================================
   HTMX SPA PROGRESS BAR & OVERLAYS
   =============================================== */

/* Barra de Progresso */
.htmx-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: 10000;
    overflow: hidden;
}

.htmx-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    animation: progress-shine 2s infinite;
}



@keyframes progress-shine {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Loading Overlay */
.htmx-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.htmx-loading-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    width: 90%;
}

.htmx-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.htmx-loading-message {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Error Overlay */
.htmx-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.htmx-error-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
}

.htmx-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.htmx-error-title {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.htmx-error-message {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.htmx-error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.htmx-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.htmx-btn-primary {
    background-color: #007bff;
    color: white;
}

    .htmx-btn-primary:hover {
        background-color: #0056b3;
    }

.htmx-btn-secondary {
    background-color: #6c757d;
    color: white;
}

    .htmx-btn-secondary:hover {
        background-color: #545b62;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===============================================
   LAYOUT PRINCIPAL
   =============================================== */

.nox-container {
    display: flex;
    height: 100%;
    width: 100%;
    flex-direction: row;
    overflow-x: hidden;
}

.nox-sidebar {
    background-color: #fff;
    color: #fff;
    width: 250px;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-x: hidden;
    overflow-y: hidden;
    border-right: 1px solid #e0e0e0;
}

    .nox-sidebar .dx-treeview-search {
        margin-left: 8px;
        margin-right: 8px;
    }

    .nox-sidebar .nox-sidebar-logo-product {
        display: flex;
        justify-content: center;
        align-items: stretch;
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        height: 10%;
    }

        .nox-sidebar .nox-sidebar-logo-product a {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nox-sidebar .nox-sidebar-logo-product .img {
            height: 100%;
            min-width: 180px;
            background-repeat: no-repeat;
            background-size: contain;
            background-position: center;
        }

.nox-sidebar-content {
    flex-grow: 1;
    overflow-y: auto; /* Adiciona scroll apenas ao conteúdo do menu */
    padding-bottom: 80px; /* Espaço para o footer fixo */
}

/* Estilos para o container da ação no menu */
.nox-menu .nox-menu-action-container {
    display: flex;
    align-items: center;
    margin-left: auto; /* Empurra o botão para a direita dentro do flex container */
    padding-right: 8px; /* Pequeno espaçamento da borda direita do item do menu */
}

/* Estilo para o botão de adicionar (+) no menu */
.nox-menu .nox-menu-add-btn {
    background-color: transparent;
    border: none;
    color: #757575; /* Cor do ícone - um cinza médio, sutil */
    padding: 4px; /* Espaçamento interno para um botão compacto */
    border-radius: 4px; /* Bordas levemente arredondadas */
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: inline-flex; /* Para alinhar o ícone corretamente */
    align-items: center;
    justify-content: center;
    width: 26px; /* Largura ajustada para o ícone */
    height: 26px; /* Altura ajustada para o ícone */
    line-height: 1; /* Para melhor alinhamento vertical do ícone */
}

    .nox-menu .nox-menu-add-btn:hover,
    .nox-menu .nox-menu-add-btn:focus {
        background-color: #e0e0e0; /* Cor de fundo no hover/focus, um pouco mais escura que o hover do item */
        color: #333333; /* Cor do ícone mais escura no hover/focus */
    }

    .nox-menu .nox-menu-add-btn .fa-plus {
        font-size: 0.9em; /* Tamanho do ícone ligeiramente menor para melhor encaixe */
    }

    /* Estilos para estados visuais (loading, success, error) */
    .nox-menu .nox-menu-add-btn.nox-btn-loading .fa-plus {
        animation: nox-menu-spin 1s linear infinite; /* Animação de carregamento */
    }

@keyframes nox-menu-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.nox-menu .nox-menu-add-btn.nox-btn-success .fa-plus::before {
    content: "\f00c"; /* Ícone de check (FontAwesome) */
    color: #4CAF50; /* Verde para sucesso */
    font-weight: bold;
}

.nox-menu .nox-menu-add-btn.nox-btn-error .fa-plus::before {
    content: "\f071"; /* Ícone de aviso/exclamação (FontAwesome) */
    color: #F44336; /* Vermelho para erro */
    font-weight: bold;
}

/* ===============================================
   MENU BADGES/TAGS (BETA)
   =============================================== */

.nox-menu-badge {
    display: ruby;
    padding: 2px 6px;
    margin-left: 3px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1;
    vertical-align: middle;
    background-color: #ff9800;
    color: white;
}

.nox-sidebar .nox-close-sidebar {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    color: #000;
    font-size: 20px;
    cursor: pointer;
}

.nox-main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    width: 100%; /* Adicione width 100% para que o .nox-main ocupe todo o espa�o dispon�vel */
    transition: margin-left 0.3s ease;
    overflow-x: hidden; /* Evita overflow horizontal */
    overflow-y: auto; /* Adiciona rolagem vertical independente */
    padding-top: 56px; /* Altura da navbar para não sobrepor o conteúdo */
}

.nox-navbar {
    color: #fff;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .nox-navbar .dx-buttongroup-wrapper {
        display: flex;
    }

.nox-breadcrumb {
    background-color: rgba(0,0,0,.04);
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 17px;
    position: relative;
    cursor: text;
    color: rgba(0,0,0,.6);
    font-size: 14px;
    line-height: normal;
}

    .nox-breadcrumb::before {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: #8f8f8f;
    }

.nox-toggle-sidebar {
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: block;
}

.nox-navbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

    .nox-navbar-right a {
        color: #fff;
        text-decoration: none;
    }

        .nox-navbar-right a img {
            height: 20px;
            width: 20px;
        }

    .nox-navbar-right .dx-icon {
        color: #fff;
    }

.dx-list-items .dx-icon {
    color: rgba(0,0,0,.54);
}

.nox-navbar-right .dx-button-content {
    padding-inline: 1px !important;
}

.nox-content-wrapper {
    padding: 0px 1px;
    background-color: #f2f0f0;
    overflow-x: auto; /* Permite scroll horizontal se necess�rio */
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.nox-content {
    padding: 0px 8px;
    height: 100%;
    width: 100%;
    max-width: 100%; /* Garante que a largura n�o ultrapasse 100% */
    box-sizing: border-box;
    background-color: #fff;
    overflow-x: auto; /* Adiciona scroll horizontal se necess�rio */
}

.nox-sidebar-collapsed {
    width: 0;
    transform: translateX(-250px); /* Move the sidebar out of view */
    overflow-x: hidden;
}

.nox-main-collapsed {
    margin-left: 0;
    overflow-x: hidden;
}

.nox-report-tabs {
    height: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .nox-container {
        flex-direction: column;
    }

    .nox-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        z-index: 1000;
        width: 100%;
    }

        .nox-sidebar.nox-open {
            transform: translateX(0);
            padding-top: 56px; /* Altura da navbar */
            height: calc(100% - 56px); /* Ajusta a altura para compensar o padding */
            box-sizing: border-box; /* Garante que padding não aumente a altura total */
        }

    .nox-toggle-sidebar {
        display: block;
    }

    .nox-sidebar .nox-close-sidebar {
        display: block;
    }

    .nox-main {
        margin-left: 0;
    }

    .nox-navbar {
        left: 0 !important; /* Força o posicionamento à esquerda no mobile */
    }

    .nox-menu .nox-btn-menu-container {
        font-size: 16px;
    }
}

.nox-menu .dx-treeview-item {
    padding: 0;
}

.nox-menu .nox-btn-menu-container {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.nox-menu .nox-menu-icon {
    width: 24px;
    text-align: center;
    display: inline-block;
}

.nox-menu .nox-btn-menu {
    flex-grow: 1;
    padding: 10px;
    text-decoration: none;
    color: inherit;
}

.nox-menu .nox-btn-menu-container:hover {
    background-color: #f0f0f0; /* Adiciona um efeito de hover ao cont�iner */
}

.nox-menu .dx-treeview {
    padding: 0;
}

    .nox-menu .dx-treeview li.dx-treeview-node .dx-item a {
        text-transform: uppercase;
        color: #505050;
    }

    .nox-menu .dx-treeview li.dx-treeview-node li.dx-treeview-node .dx-item a {
        text-transform: none;
    }

    .nox-menu .dx-treeview li.dx-treeview-node li.dx-treeview-node:not(.dx-state-selected) .dx-item a {
        color: #505050;
        font-weight: normal;
    }

    .nox-menu .dx-treeview li.dx-treeview-node.dx-state-selected:not(.dx-treeview-node-is-leaf) .dx-item {
        background-color: transparent;
    }

    .nox-menu .dx-treeview li.dx-treeview-node.dx-treeview-node-is-leaf.dx-state-selected .dx-item {
        background-color: #e9e9e9;
    }

        .nox-menu .dx-treeview li.dx-treeview-node.dx-treeview-node-is-leaf.dx-state-selected .dx-item a {
            font-weight: normal;
        }


.nox-wrapper {
    margin-left: 260px;
    padding: 0 25px 30px 30px;
}

.nox-navbar-item-container {
    display: flex;
    align-items: center;
    padding: 10px;
    position: relative;
}

.nox-navbar-notification-content {
    overflow: hidden;
    flex: 1 0 auto;
}

.nox-navbar-notification-title {
    font-size: 16px;
    font-weight: bold;
    color: inherit;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nox-navbar-notification-body {
    width: 230px;
}

.nox-navbar-notification-body-content {
    color: inherit;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nox-navbar-notification-date {
    font-size: 12px;
    color: inherit;
}

.nox-navbar-notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
}

.nox-navbar .dx-list-static-delete-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.nox-navbar-item-container {
    display: flex;
    align-items: center;
    padding: 10px;
    position: relative;
    padding-right: 40px; /* Espa�o para o bot�o de exclus�o */
}

#viewAllNotifications:hover {
    background-color: #f5f5f5;
}

.nox-navbar-item-container.lida {
    background-color: #f0f0f0;
    color: #aaa;
}

.nox-gallery-container-search-father {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    width: 100%;
    padding: 0;
    border: none;
    background-color: transparent;
    user-select: none;
}

.nox-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
    width: 104%;
    height: 105%;
    overflow: hidden;
    border-radius: 10px;
    border: 2px solid #ddd;
    background-color: #fff;
    transition: transform 0.3s ease;
}

    .nox-image-container:hover {
        cursor: pointer;
        transform: scale(1.05);
        border-color: #aaa;
    }

    .nox-image-container img {
        max-width: 100%;
        object-fit: contain;
        height: 120px;
    }

.nox-image-name {
    text-align: center;
    font-size: 13px;
}

/* === Navbar V2 Styles === */
.nox-navbar {
    background-color: var(--nox-primary-color);
    color: white;
    height: 56px; /* Altura do protótipo (h-14 -> 3.5rem -> 56px) */
    padding: 0 16px; /* px-4 -> 1rem -> 16px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 250px; /* Largura da sidebar */
    right: 0;
    z-index: 1001;
    transition: left 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nox-main-collapsed .nox-navbar {
    left: 0;
}

.nox-navbar-left, .nox-navbar-right {
    display: flex;
    align-items: center;
    gap: 12px; /* space-x-3 -> 0.75rem -> 12px */
}

.nox-navbar-left {
    flex-grow: 1;
    min-width: 0; /* Prevents flex items from overflowing */
}

.nox-navbar-breadcrumb {
    margin-left: 5px;
    display: flex;
    align-items: center;
    flex-grow: 1;
    font-size: 1.4em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .nox-navbar-breadcrumb > * {
        margin-right: 8px;
        text-decoration: none;
    }

        .nox-navbar-breadcrumb > *:last-child {
            margin-right: 0;
        }

/* MobIA Button - Structure */
.nox-navbar-mobia-btn-native {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 0.375rem; /* rounded-md */
    padding: 6px 12px; /* px-3 py-1.5 */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px; /* space-x-1.5 */
    font-size: 0.75rem; /* text-xs */
    font-weight: 500; /* font-medium */
    transition: background-color 0.2s;
    height: 38px; /* Ajuste para alinhar com outros botões */
}

    .nox-navbar-mobia-btn-native:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .nox-navbar-mobia-btn-native:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    }

/* Ajustes para botões DevExtreme na navbar */
.nox-navbar-right .dx-button {
    background-color: transparent;
    border: none;
    color: white;
    height: 38px; /* Altura consistente */
    width: 38px; /* Largura consistente */
    border-radius: 9999px; /* rounded-full */
    padding: 6px; /* p-1.5 */
}

    .nox-navbar-right .dx-button:hover {
        background-color: rgba(0, 0, 0, 0.15); /* Equivalente a hover:bg-orange-700 */
    }

    .nox-navbar-right .dx-button .dx-button-content {
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nox-navbar-right .dx-button .dx-icon {
        font-size: 20px; /* text-xl */
        color: white;
        margin: 0;
    }

    .nox-navbar-right .dx-button .dx-button-text {
        display: none; /* Esconde o texto por padrão, como no protótipo */
    }

/* Estilo específico para o botão de empresa que tem texto */
#companyButton.dx-button {
    width: auto; /* Largura automática para acomodar o texto */
    padding: 6px 12px; /* Padding horizontal maior */
    border-radius: 0.375rem; /* rounded-md */
}

    #companyButton.dx-button .dx-button-text {
        display: inline;
        font-size: 0.75rem;
        font-weight: 500;
        margin-left: 8px; /* Espaço entre ícone e texto */
    }

.nox-chat-logo {
    display: flex;
    align-items: center;
}

.nox-chat-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.nox-chat-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.nox-chat-beta {
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    background-color: #6c757d;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 8px;
}

.nox-chat-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

.nox-chat-area {
    flex-grow: 1;
    overflow-y: auto;
}

.nox-chat-tagline {
    text-align: center;
    padding: 15px;
    font-size: 14px;
    color: #666;
    background-color: #f9f9f9;
}

/* User Initials Icon - Structure & FIX for clipping */
.nox-navbar-user-btn.dx-button {
    min-width: 36px;
    width: 36px; /* Fix width */
    height: 36px; /* Fix height */
    padding: 0 !important;
    border-radius: 50%; /* Make the button itself a circle */
    overflow: hidden; /* Hide anything outside the circle */
}

.nox-navbar-user-btn .dx-button-content {
    padding: 0 !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nox-navbar-user-initials {
    width: 27px; /* Fill the container */
    height: 27px; /* Fill the container */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    line-height: 1;
}

.nox-menu-small-devextreme-button .dx-button {
    width: 20px !important;
    height: 20px !important;
    min-width: auto !important;
    padding: 0 !important;
}

    .nox-menu-small-devextreme-button .dx-button .dx-button-content {
        padding-block: 0px !important;
        padding-inline-start: 0px !important;
        padding-inline-end: 0px !important;
    }

    .nox-menu-small-devextreme-button .dx-button .dx-icon {
        color: #2196F3 !important;
    }

/* ========================================================= */
/* RODAPÉ DA EMPRESA NO MENU LATERAL - ESTILOS ÚNICOS      */
/* ========================================================= */

.nox-sidebar-empresa-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 250px; /* Largura da sidebar */
    background-color: #ffffff;
    border-top: 1px solid #e5e5e5;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease, width 0.3s ease;
}

/* Ajuste quando sidebar está collapsed */
.nox-sidebar-collapsed .nox-sidebar-empresa-footer {
    left: -250px;
}

.nox-empresa-details-panel {
    padding: 16px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    overflow-y: auto; /* Adiciona scroll interno quando necessário */
    max-height: 0;
}

    .nox-empresa-details-panel.collapsed {
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        opacity: 0;
    }

    .nox-empresa-details-panel.expanded {
        max-height: 60vh; /* Altura máxima de 60% da viewport */
        opacity: 1;
    }

.nox-empresa-section-header {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.nox-empresa-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.nox-empresa-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    min-width: 70px;
}

.nox-empresa-value {
    font-size: 12px;
    color: #333;
    font-weight: 400;
}

.nox-empresa-value-copy {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nox-empresa-copy-icon {
    cursor: pointer;
    color: #007bff;
    font-size: 11px;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

    .nox-empresa-copy-icon:hover {
        background-color: #007bff;
        color: white;
    }

.nox-empresa-actions-container {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}

.nox-empresa-compact-area {
    padding: 12px 16px;
    background-color: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

    .nox-empresa-compact-area:hover {
        background-color: #f5f5f5;
    }

.nox-empresa-compact-content {
    flex: 1;
}

.nox-empresa-compact-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.2;
}

.nox-empresa-compact-cnpj {
    font-size: 11px;
    color: #666;
}

.nox-empresa-toggle-arrow {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nox-empresa-lista-item {
    border-radius: 4px;
    margin: 4px 0;
}

.nox-empresa-lista-nome {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.nox-empresa-lista-cnpj {
    font-size: 11px;
    color: #666;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .nox-empresa-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .nox-empresa-compact-name {
        font-size: 12px;
    }

    .nox-empresa-compact-cnpj {
        font-size: 10px;
    }

    /* Ajustes do footer no mobile */
    .nox-sidebar-empresa-footer {
        width: 100%;
        left: 0;
    }

    .nox-sidebar.nox-open .nox-sidebar-empresa-footer {
        width: 100%;
        left: 0;
    }

    .nox-empresa-details-panel.expanded {
        max-height: 50vh; /* Menor altura no mobile */
    }
}

/* ===============================================
   OVERLAY DE RECONEXÃO / TENTATIVA AUTOMÁTICA
   =============================================== */

body.nox-retry-overlay-open {
    overflow: hidden;
}

.nox-retry-overlay,
.nox-retry-overlay-fallback {
    font-family: "Noto Sans", sans-serif;
}

.nox-retry-overlay__wrapper .dx-overlay-shader {
    background-color: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
}

.nox-retry-overlay__wrapper .dx-overlay-content {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.nox-retry-overlay__panel {
    background: var(--nox-surface, #ffffff);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    padding: 36px 40px;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(var(--nox-primary-rgb, 99, 102, 241), 0.2);
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: var(--nox-gray-800, #1f2937);
}

.nox-retry-overlay__panel:focus {
    outline: none;
}

.nox-retry-overlay__status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.nox-retry-overlay__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(var(--nox-primary-rgb, 99, 102, 241), 0.14);
    color: var(--nox-primary, #6366f1);
    font-weight: 600;
    font-size: 0.88rem;
}

.nox-retry-overlay__countdown {
    font-size: 0.94rem;
    color: var(--nox-gray-700, #374151);
    min-height: 1.2em;
}

.nox-retry-overlay__description {
    font-size: 0.96rem;
    color: var(--nox-gray-600, #4b5563);
    line-height: 1.55;
    text-align: center;
}

.nox-retry-overlay__error {
    font-size: 0.85rem;
    background: rgba(220, 53, 69, 0.08);
    color: #7f1d1d;
    border: 1px solid rgba(220, 53, 69, 0.18);
    padding: 12px 14px;
    border-radius: 14px;
    line-height: 1.45;
    max-height: 140px;
    overflow-y: auto;
}

.nox-retry-overlay__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (min-width: 520px) {
    .nox-retry-overlay__actions {
        flex-direction: row;
    }
}

.nox-retry-overlay__btn {
    flex: 1;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 600;
    font-size: 0.96rem;
    cursor: pointer;
    border: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    font-family: "Noto Sans", sans-serif;
}

.nox-retry-overlay__btn:focus-visible {
    outline: 2px solid rgba(var(--nox-primary-rgb, 99, 102, 241), 0.45);
    outline-offset: 3px;
}

.nox-retry-overlay__btn--primary {
    background: var(--nox-primary, #6366f1);
    color: #ffffff;
    box-shadow: 0 20px 52px rgba(var(--nox-primary-rgb, 99, 102, 241), 0.28);
}

.nox-retry-overlay__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 58px rgba(var(--nox-primary-rgb, 99, 102, 241), 0.34);
}

.nox-retry-overlay__btn--secondary {
    background: #ffffff;
    color: var(--nox-gray-700, #374151);
    border: 1px solid rgba(var(--nox-gray-300, 209, 213, 219), 1);
}

.nox-retry-overlay__btn--secondary:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--nox-gray-500, 107, 114, 128), 0.65);
}

.nox-retry-overlay__spinner {
    display: inline-flex;
    gap: 10px;
}

.nox-retry-overlay__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--nox-primary, #6366f1);
    animation: nox-retry-pulse 1.1s ease-in-out infinite;
    opacity: 0.78;
}

/* ===============================================
   PROMPT DE RECUPERAÇÃO DE SESSÃO
   =============================================== */

body.nox-session-recovery-open {
    overflow: hidden;
}

.nox-session-recovery__wrapper .dx-overlay-shader {
    background-color: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
}

.nox-session-recovery__wrapper .dx-overlay-content {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.nox-session-recovery {
    background: var(--nox-surface, #ffffff);
    border-radius: 20px;
    padding: 32px 36px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(var(--nox-primary-rgb, 99, 102, 241), 0.2);
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-family: "Noto Sans", sans-serif;
    color: var(--nox-gray-800, #1f2937);
}

@media (max-width: 480px) {
    .nox-session-recovery {
        padding: 28px 24px;
        border-radius: 18px;
        gap: 16px;
    }
}

.nox-session-recovery__header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nox-session-recovery__icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(var(--nox-primary-rgb, 99, 102, 241), 0.14);
    color: var(--nox-primary, #6366f1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.nox-session-recovery__icon::before {
    content: "⏳";
}

.nox-session-recovery__title {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--nox-gray-900, #111827);
}

.nox-session-recovery__subtitle {
    margin: 4px 0 0;
    font-size: 0.95rem;
    color: var(--nox-gray-600, #4b5563);
}

.nox-session-recovery__message {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--nox-gray-700, #374151);
}

.nox-session-recovery__hint {
    font-size: 0.9rem;
    color: var(--nox-gray-500, #6b7280);
}

.nox-session-recovery__hint[hidden] {
    display: none;
}

.nox-session-recovery__details {
    font-family: "Fira Code", "Consolas", "SFMono-Regular", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    border: 1px solid rgba(var(--nox-gray-300, 209, 213, 219), 0.8);
    padding: 14px 16px;
    max-height: 240px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--nox-gray-700, #374151);
}

.nox-session-recovery__details[hidden] {
    display: none;
}

.nox-session-recovery__copy-feedback {
    font-size: 0.84rem;
    color: var(--nox-primary, #6366f1);
    font-weight: 600;
}

.nox-session-recovery__copy-feedback[hidden] {
    display: none;
}

.nox-session-recovery__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 520px) {
    .nox-session-recovery__actions {
        flex-direction: row;
    }
}

.nox-session-recovery__clipboard-helper {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
}

.nox-retry-overlay__dot:nth-child(2) {
    animation-delay: 0.18s;
}

.nox-retry-overlay__dot:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes nox-retry-pulse {
    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.55;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 520px) {
    .nox-retry-overlay__panel {
        max-width: 92vw;
        padding: 28px 24px;
        border-radius: 18px;
    }

    .nox-retry-overlay__description {
        font-size: 0.92rem;
    }
}
