/* ========================================
   CONSULTAS URBANAS - NOVO LAYOUT
   Estilos customizados - Boas Práticas CSS
   ======================================== */

body {
    background-color: #f7f7f7;
}   

/* Header */
.header-logo-img {
    max-height: 50px;
}

.header-logo-sistema {
    max-height: 230px;
    width: auto;
}

.hero-banner {
    /*background: linear-gradient(135deg, #2B6BA8 0%, #1e4d7a 100%);*/
    background-color: #ffffff15;

    padding: 20px 0 60px;
    position: relative;
}

.hero-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: no-repeat center top url('../img/bg-site.jpg');
    opacity: 0.15;
}

.hero-banner-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'cera_problack';
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-family: 'cera_proregular';
    opacity: 0.95;
    margin-bottom: 20px;
}

/* Formulário de Pesquisa */
.search-card-header {
    background: white;
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.search-card-title {
    font-family: 'cera_probold';
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Botão de Ajuda */
.btn-help {
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #5B8DBE;
    font-family: 'cera_proregular';
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-help:hover {
    background: #E8F4FD;
    border-color: #5B8DBE;
    color: #2B6BA8;
    transform: translateY(-1px);
}

.btn-help:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 141, 190, 0.15);
}

.btn-help i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn-help[aria-expanded="true"] {
    background: #E8F4FD;
    border-color: #5B8DBE;
    color: #2B6BA8;
}

.btn-help[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Container de Ajuda */
.help-box {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    border: 1px solid #d6e9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(91, 141, 190, 0.08);
    text-align: left;
}

/* Transição suave do collapse */
.collapse {
    transition: height 0.35s ease;
}

.collapsing {
    transition: height 0.35s ease;
}

.alert-warning {
    background-color: #fff9e5;
}

.alert-danger {
    background-color: #fff4f5;
}

/* Item de Ajuda */
.help-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    animation: helpItemFadeIn 0.4s ease-out backwards;
}

.help-item:last-child {
    margin-bottom: 0;
}

.help-item:nth-child(1) { animation-delay: 0.1s; }
.help-item:nth-child(2) { animation-delay: 0.2s; }
.help-item:nth-child(3) { animation-delay: 0.3s; }
.help-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes helpItemFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ícone de Ajuda */
.help-icon {
    background: #5B8DBE;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 14px;
    box-shadow: 0 2px 6px rgba(91, 141, 190, 0.25);
}

.help-icon i {
    font-size: 14px;
}

/* Texto de Ajuda */
.help-text {
    font-family: 'cera_proregular';
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    padding-top: 4px;
    text-align: left;
    flex: 1;
}

.help-text strong {
    color: #2B6BA8;
    font-family: 'cera_probold';
}

.help-text em {
    color: #5B8DBE;
    font-style: normal;
    font-weight: 500;
}

.help-text .text-success {
    color: #4CAF50 !important;
    font-size: 14px;
    vertical-align: middle;
    margin-left: 2px;
}

.form-label-custom {
    font-family: 'cera_proregular';
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    display: block;
    font-weight: 500;
}

.form-label-required {
    color: #d32f2f;
}

.form-input-custom {
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'cera_proregular';
    height: 44px;
    transition: all 0.2s ease;
}

.form-input-custom:focus {
    border-color: #5B8DBE;
    box-shadow: 0 0 0 0.2rem rgba(91, 141, 190, 0.15);
    outline: none;
}

/* ========================================
   BOTÃO PESQUISAR - Modernizado
   ======================================== */

.btn-search {
    background: linear-gradient(135deg, #4b9fc8 0%, #5dcb9c 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-family: 'cera_probold';
    font-size: 15px;
    font-weight: 600;
    color: white;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

/* Efeito de brilho ao passar o mouse */
.btn-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-search:hover::before {
    left: 100%;
}

.btn-search:hover:not(:disabled) {
    background: linear-gradient(135deg, #4b9fc8 0%, #5dcb9c 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-search:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-search:focus:not(:disabled) {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Ícone do botão com animação */
.btn-search i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-search:hover:not(:disabled) i {
    transform: scale(1.15) rotate(-5deg);
}

/* Estado desabilitado mais amigável */
.btn-search:disabled {
    /*background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    cursor: not-allowed;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: #9e9e9e;*/
    opacity: 0.5;
}

.btn-search:disabled i {
    opacity: 0.5;
}

/* Animação de pulse quando habilitado */
@keyframes btn-ready-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(75, 159, 200, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(75, 159, 200, 0.5);
    }
}

.btn-search:not(:disabled) {
    animation: btn-ready-pulse 2s ease-in-out infinite;
}

.btn-clear {
    border: 1px solid #b3b3b3;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 10px;
    font-size: 18px;
    height: 44px;
    color: #666;
    transition: all 0.2s ease;
}

.btn-clear:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

/* ========================================
   INDICADOR DE CONEXÕES - Modernizado
   ======================================== */

.connection-indicator-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.connection-indicator {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
    border: 1px solid #81C784;
    border-radius: 20px;
    padding: 6px 14px;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.15);
    transition: all 0.3s ease;
}

.connection-indicator:hover {
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.25);
    transform: translateY(-1px);
}

.connection-indicator-icon {
    font-size: 9px;
    color: #4CAF50;
    margin-right: 8px;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.connection-indicator-text {
    font-family: 'cera_proregular';
    font-size: 13px;
    color: #2E7D32;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.connection-indicator-text b {
    font-family: 'cera_probold';
}

/* Estado: Conexões Inativas (caso necessário no futuro) */
.connection-indicator.inactive {
    background: linear-gradient(135deg, #FFEBEE 0%, #FCE4EC 100%);
    border-color: #EF9A9A;
}

.connection-indicator.inactive .connection-indicator-icon {
    color: #F44336;
    animation: none;
}

.connection-indicator.inactive .connection-indicator-text {
    color: #C62828;
}

/* ========================================
   RESULTADO DA BUSCA - Modernizado
   ======================================== */

.search-result-text {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #E3F2FD 0%, #caf3e3 100%);
    border: 1px solid #90CAF9;
    border-radius: 20px;
    padding: 6px 16px;
    font-family: 'cera_proregular';
    color: #1565C0;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.12);
    transition: all 0.3s ease;
    gap: 8px;
}

.search-result-text:hover {
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.2);
    transform: translateY(-1px);
}

.search-result-text i {
    color: #1976D2;
    font-size: 12px;
    margin-right: 2px;
}

.search-result-text b {
    font-family: 'cera_probold';
    color: #0D47A1;
    margin-right: 4px;
}

.search-result-highlight {
    color: #1565C0;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    padding: 3px 10px;
    border-radius: 14px;
    font-family: 'cera_probold';
    box-shadow: 0 1px 3px rgba(33, 150, 243, 0.1);
    transition: all 0.2s ease;
}

.search-result-highlight:hover {
    background: rgba(255, 255, 255, 1);
}

/* Botão Limpar Pesquisa - Seguindo estilo do search-result-text */
.btn-limpar-pesquisa {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 1px solid #FFB74D;
    border-radius: 20px;
    padding: 6px 16px;
    font-family: 'cera_proregular';
    color: #E65100;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.12);
    transition: all 0.3s ease;
    gap: 8px;
    cursor: pointer;
}

.btn-limpar-pesquisa:hover {
    background: linear-gradient(135deg, #FFE0B2 0%, #FFCC80 100%);
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.2);
    transform: translateY(-1px);
    border-color: #FF9800;
}

.btn-limpar-pesquisa:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(255, 152, 0, 0.15);
}

.btn-limpar-pesquisa i {
    color: #F57C00;
    font-size: 12px;
    margin-right: 2px;
}

.btn-limpar-pesquisa span {
    color: #E65100;
    font-family: 'cera_proregular';
}

/* Main Content */
#content-search {
    background: url('../img/background-home.png') no-repeat top center;
    padding-bottom: 30px;
}

/* Seção Sistemas Disponíveis */
.sistemas-section-title {
    font-family: 'cera_probold';
    font-size: 28px;
    color: #333;
    /*margin-bottom: 15px;*/
}

.sistemas-section-subtitle {
    font-family: 'cera_proregular';
    font-size: 16px;
    color: #666;
}

/* Cards de Sistema */
.sistema-card-link {
    text-decoration: none;
    display: block;
}

.sistema-card-link.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.sistema-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
    min-height: 110px;
    position: relative;
}

.sistema-card .icon-wrapper {
    background: #E8F4FD;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 16px;
}

.sistema-card .icon-wrapper i {
    color: #2196F3;
    font-size: 20px;
}

.sistema-card .content-wrapper {
    flex: 1;
}

.sistema-card-title {
    font-family: 'cera_probold';
    /*font-size: 20px;*/
    color: #333;
    margin-bottom: 6px;
    margin-top: 0;
}

.sistema-card-desc {
    font-family: 'cera_proregular';
    font-size: 14px;
    color: #5B8DBE;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Indicador de Check - Sistema com Dados */
.sistema-card-check {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkFadeIn 0.5s ease-in-out;
}

.sistema-card-check i {
    color: #4cbf92;
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(76, 175, 80, 0.3));
    animation: checkPulse 2s ease-in-out infinite;
}

/* Animação de entrada do check */
@keyframes checkFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    60% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Animação de pulso sutil */
@keyframes checkPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Footer */
.footer-modern {
    background: linear-gradient(135deg, #2B6BA8 0%, #1e4d7a 100%);
    color: white;
    padding: 50px 0 30px;
}

.footer-logo {
    height: 45px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-title {
    font-family: 'cera_probold';
    font-size: 18px;
    margin-bottom: 15px;
    color: white;
}

.footer-text {
    font-family: 'cera_proregular';
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-text-sm {
    font-family: 'cera_proregular';
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.footer-section-title {
    font-family: 'cera_probold';
    font-size: 16px;
    margin-bottom: 20px;
    color: white;
}

.footer-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: 'cera_proregular';
    font-size: 14px;
    transition: all 0.3s;
}

.footer-link:hover {
    color: #ffffff !important;
    transform: translateX(3px);
}

.footer-version-box {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.footer-version-icon {
    font-size: 32px;
    color: rgba(255,255,255,0.9);
}

.footer-version-label {
    font-family: 'cera_proregular';
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 8px;
}

.footer-version-number {
    font-family: 'cera_probold';
    font-size: 16px;
    color: white;
    margin-bottom: 15px;
}

.footer-dev-text {
    font-family: 'cera_proregular';
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.footer-divider {
    border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-copyright {
    font-family: 'cera_proregular';
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.footer-badge {
    font-family: 'cera_proregular';
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

/* Interações e Estados */
.search-card-header {
    transition: all 0.3s ease;
}

.hero-banner {
    overflow: visible !important;
}

/* Cards de Sistema - Estados */
.sistemas-grid {
    justify-content: center;
}

.sistema-card {
    height: 100%;
}

.sistema-card-link:not(.disabled) .sistema-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border-color: #2196F3 !important;
}

.sistema-card-link:not(.disabled):hover .sistema-card-check i {
    transform: scale(1.1) rotate(10deg);
    color: #45a049;
}

.sistema-card-link:not(.disabled):hover .icon-wrapper {
    background: #2196F3 !important;
}

.sistema-card-link:not(.disabled):hover .icon-wrapper i {
    color: white !important;
}

/* Estado desabilitado dos cards */
.sistema-card-link.disabled .sistema-card {
    background: #fafafa !important;
}

.sistema-card-link.disabled .icon-wrapper {
    background: #f0f0f0 !important;
}

.sistema-card-link.disabled h4,
.sistema-card-link.disabled p {
    color: #bbb !important;
}

.sistema-card-link.disabled i {
    color: #ccc !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
        margin-bottom: 30px !important;
    }
    
    .search-card-header {
        padding: 25px 20px !important;
    }
    
    .btn-help {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .btn-help i {
        font-size: 12px;
    }
    
    .help-box {
        padding: 16px;
    }
    
    .help-item {
        margin-bottom: 14px;
    }
    
    .help-icon {
        width: 28px;
        height: 28px;
        margin-right: 12px;
    }
    
    .help-icon i {
        font-size: 12px;
    }
    
    .help-text {
        font-size: 12px;
    }
    
    /*
    .hero-banner {
        padding: 40px 0 60px !important;
    }
        */
    
    #content-search {
        padding-top: 40px !important;
    }
    
    .sistema-card {
        min-height: auto !important;
    }
    
    .btn-search,
    .btn-clear,
    .form-input-custom {
        height: 46px;
        font-size: 14px;
    }
    
    .btn-search {
        padding: 10px 20px;
        border-radius: 10px;
    }
    
    .btn-search i {
        font-size: 14px;
    }
    
    .connection-indicator-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .connection-indicator,
    .search-result-text,
    .btn-limpar-pesquisa {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
    }
    
    .search-result-text,
    .btn-limpar-pesquisa {
        text-align: center;
    }
}

/* Responsivo para tablets */
@media (max-width: 768px) {
    .connection-indicator-wrapper {
        gap: 8px;
    }
    
    .connection-indicator,
    .search-result-text,
    .btn-limpar-pesquisa {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .connection-indicator-text,
    .search-result-text,
    .btn-limpar-pesquisa span {
        font-size: 12px;
    }
    
    .search-result-highlight {
        padding: 2px 8px;
    }
    
    .header-logo-img {
        max-height: 40px;
    }
    
    .header-logo-sistema {
        max-height: auto;
    }
    
    .sistema-card-check {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
    }
    
    .sistema-card-check i {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .sistema-card {
        min-height: auto !important;
    }
    
    .col-md-6 {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 28px !important;
    }
    
    .search-card-title {
        font-size: 16px !important;
    }
    
    .header-logo-img {
        max-height: 35px;
    }
    
    .header-logo-sistema {
        max-height: 200px;
    }
    
    .back-to-top-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .btn-help {
        width: 100%;
        justify-content: center;
        display: flex;
    }
    
    .help-box {
        padding: 14px;
    }
    
    .help-text {
        font-size: 11px;
    }
}

/* ========================================
   AUTOCOMPLETE MELHORADO - UX
   ======================================== */

/* Container do input com loading */
.input-with-icon {
    position: relative;
    display: block;
}

.input-with-icon .form-input-custom {
    width: 100%;
    padding-right: 40px; /* Espaço para o ícone */
}

/* Ícone de pesquisa (criado via JS) */
.input-with-icon .autocomplete-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.5;
    transition: all 0.3s;
    z-index: 5;
}

/* Ícone mais destacado quando input tem foco */
.input-with-icon.is-focused .autocomplete-search-icon {
    color: #5B8DBE;
    opacity: 1;
}

/* Ícone de loading (spinner) */
.input-with-icon .autocomplete-spinner {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #5B8DBE;
    font-size: 14px;
    display: none;
    pointer-events: none;
    z-index: 10;
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Nota: Os ícones agora são criados via JavaScript (autocomplete-search-icon e autocomplete-spinner)
   ao invés de usar ::after com Font Awesome, para maior confiabilidade cross-browser */

/* Feedback de sucesso ao selecionar */
.field-success {
    border-color: #4CAF50 !important;
    background-color: #f1f8f4 !important;
    transition: all 0.3s ease;
}

/* Menu do autocomplete customizado - Vanilla JS */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    width: max-content;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 4px 0;
    margin-top: 4px;
    background: white;
    font-family: 'cera_proregular';
    z-index: 9999;
    list-style: none;
}

/* Itens do autocomplete */
.autocomplete-item {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 2px 0 !important;
}

.autocomplete-label {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.autocomplete-label i {
    color: #5B8DBE;
    font-size: 13px;
    width: 20px;
}

/* Destaque do termo pesquisado */
.autocomplete-label strong {
    color: #2B6BA8;
    font-weight: 600;
    background: rgba(91, 141, 190, 0.1);
    padding: 1px 3px;
    border-radius: 3px;
}

/* Hover e Active no item */
.autocomplete-item.active .autocomplete-label,
.autocomplete-item:hover .autocomplete-label {
    background: linear-gradient(90deg, #f0f7ff 0%, #ffffff 100%);
    border-left-color: #5B8DBE;
    color: #1a1a1a;
}

.autocomplete-item.active .autocomplete-label i,
.autocomplete-item:hover .autocomplete-label i {
    color: #2B6BA8;
}

/* Mensagem de "sem resultados" ou erro */
.autocomplete-message {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none;
}

.autocomplete-no-results {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 13px;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 8px;
}

.autocomplete-no-results i {
    color: #999;
}

/* Scrollbar customizada */
.autocomplete-results::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.autocomplete-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading state no input */
.autocomplete-loading {
    background-image: linear-gradient(90deg, #f8f8f8 0%, #ffffff 50%, #f8f8f8 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsividade do autocomplete */
@media (max-width: 768px) {
    .ui-autocomplete.autocomplete-menu-custom {
        max-height: 200px;
        font-size: 13px;
    }
    
    .autocomplete-label {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .autocomplete-no-results {
        padding: 12px;
        font-size: 12px;
    }
}

/* ========================================
   LOADING MODAL - VANILLA JS
   ======================================== */

.custom-loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-loading-modal.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    border-radius: 12px;
    padding: 40px 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-loading-modal.show .loading-content {
    transform: scale(1);
}

.loading-spinner {
    margin-bottom: 20px;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: #5B8DBE !important;
}

.loading-text {
    font-family: 'cera_probold';
    font-size: 16px;
    color: #333;
    margin: 0;
}

/* ========================================
   BOTÃO VOLTAR AO TOPO
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2B6BA8 0%, #1e4d7a 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease-in-out;
    z-index: 9999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #1e4d7a 0%, #163a5f 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.back-to-top i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Responsividade do botão */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 14px;
    }
}
