/**
 * TOP HEADER - Zona superior con enlaces, idiomas y usuario
 * Solución simple compatible con Bootstrap 3
 */

/* Contenedor principal del top header */
#top_cerca {
    background-color: #fff;
    padding: 0.5rem 0;
    font-size: 14px;
}

/* Container de enlaces - Desktop alineado derecha */
.top-header-links {
    text-align: right;
    padding: 0.5rem 15px;
}

/* Enlaces del top header */
#top_cerca .top-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.15s ease-in-out;
    margin-left: 8px;
    margin-right: 8px;
}

#top_cerca a.top-link:hover,
#top_cerca a.top-link:focus {
    color: #000;
    text-decoration: none;
}

/* Separadores */
#top_cerca .separator {
    color: #dee2e6;
    margin: 0 8px;
}

/* Iconos */
#top_cerca .top-link i,
#top_cerca .top-link .glyphicon {
    margin-right: 0.25rem;
    font-size: 12px;
}

/* Dropdown (Usuario logueado) */
#top_cerca .dropdown {
    display: inline-block;
    position: relative;
}

#top_cerca .dropdown .dropdown-toggle {
    cursor: pointer;
}

#top_cerca .dropdown a.dropdown-toggle:hover {
    color: #000;
}

#top_cerca .dropdown-toggle .caret {
    margin-left: 4px;
}

#top_cerca .dropdown-menu {
    right: 0;
    left: auto;
}

#top_cerca .dropdown-menu > li > a .glyphicon {
    margin-right: 8px;
}

/* Enlaces con estilos específicos */
body.diba #top_cerca .top-link.font-bold {
    font-weight: 600;
}

body.diba #top_cerca a.clickable,
body.diba #top_cerca .dropdown-toggle,
body.diba #top_cerca a[ng-click] {
    cursor: pointer;
}

/* Logos header con altura fija */
body.diba #top_logo img[alt="Diputació de Barcelona"] {
    height: 50px;
}

body.diba #top_logo img[alt="Seu electrònica"] {
    height: 35px;
}

/* Responsive */
@media (max-width: 767px) {
    #top_cerca {
        font-size: 12px;
    }
    
    #top_cerca .top-link {
        font-size: 12px;
        margin-left: 5px;
        margin-right: 5px;
    }
    
    #top_cerca .separator {
        margin: 0 5px;
    }
}

/* ========================================
   OCULTAR COMPONENTES HEADER
   ======================================== */

/* Ocultar dropdown de "Accés restringit" (usuario no logueado) */
span[ng-if="!usuari.nomUsuari"] {
    display: none !important;
}