/* Cosas globales */

:root {
  --color-primario: #3aaa35;   /* verde marca Whazzer Access (tinta del logo) */
  --color-primario-hover: #2e8c2a;
  --color-secundario: #94c11f;
  --color-carbon: #0f2126;      /* carbón del logo — reemplaza al verde de fondo */
  --color-carbon-elev: #17323a; /* superficie elevada sobre el carbón */
}

/* Estilos para la barra de navegación */

.wz-logo {
    max-width: 80%;
}


/* Estilos para las tablas */


table.dataTable thead>tr>th.sorting:before, table.dataTable thead>tr>th.sorting:after {
    bottom: 50% !important;
}

table.dataTable thead>tr>th.sorting:before {
    margin-bottom: 2px !important;
}

#proveedores-abiertas thead th:nth-child(1) { width: 10% !important; }
#proveedores-abiertas thead th:nth-child(2) { width: 20% !important; }
#proveedores-abiertas thead th:nth-child(5) { width: 40% !important; }

#accesos-personal thead th:nth-child(4) { width: 30% !important; }
#accesos-personal thead th:nth-child(5) { width: 10% !important; }
#accesos-personal thead th:nth-child(6) { width: 10% !important; }


.text-orange {
    color: orange;
}

.text-yellow {
    color: #D6C92A;
}

.avatar-proveedor {
    max-width: 50%;
}

.avatar-preferente {
    max-height: 490px;
}

#accesos-preferentes .avatar-preferente {
    max-width: 50%;
}

#accesos-personal .avatar-preferente {
    max-width: 100%;
}

/* Estilos para los tooltips */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    margin-bottom: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: uppercase;
}

/* Estilo para la fila cuando el cursor está sobre ella */

#invitaciones-abiertas tbody tr.even, #proveedores-abiertas tbody tr.even, #accesos-preferentes tbody tr.even, #accesos-personal tbody tr.even, #eventos-abiertos tbody tr.even {
    background-color: #f5f5f5;
}

#invitaciones-abiertas tbody tr.hover-row, #proveedores-abiertas tbody tr.hover-row, #accesos-preferentes tbody tr.hover-row, #accesos-personal tbody tr.hover-row, #eventos-abiertos tbody tr.hover-row {
    background-color: var(--color-primario);
    cursor: pointer;
    color: white;
}

/* Estilo para la fila cuando el personal no puede acceder */

.no-puede-acceder {
    background-color: #f8d7da !important;
    color: #721c24;
}

/* ===== Selector de fraccionamiento (menú de perfil del header) ===== */
/* El tema fija .profile-body en width:158px con un selector de alta especificidad y
   estilos.css carga ANTES que style.css, por eso aquí se usa !important para ensancharlo
   y que quepan los nombres de fraccionamiento. */
header ul[class*="header-"] > li.profile-nav .custom-menu .profile-body {
    width: 260px !important;
    box-sizing: border-box;
}
.profile-body .cambiar-fracc { flex-wrap: wrap; align-items: center; cursor: pointer; }
.profile-body .cambiar-fracc .cf-icon { width: 18px; text-align: center; color: inherit; opacity: .85; }
.profile-body .cambiar-fracc .cf-label-wrap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-body .cambiar-fracc .cf-chev { font-size: .7em; opacity: .6; transition: transform .2s ease; }
.profile-body .cambiar-fracc.abierto .cf-chev { transform: rotate(180deg); }
.profile-body .submenu-fracc { display: none; width: 100%; list-style: none; margin: 6px 0 0; padding: 6px 0 0 14px; border-top: 1px solid rgba(0,0,0,.08); }
.profile-body .cambiar-fracc.abierto .submenu-fracc { display: block; }
.profile-body .submenu-fracc li { padding: 0; }
.profile-body .submenu-fracc .opcion-fracc { display: flex; align-items: center; padding: 7px 10px; border-radius: 6px; color: #2f2f3b; text-decoration: none; font-size: .88rem; }
.profile-body .submenu-fracc .opcion-fracc:hover { background: rgba(0,0,0,.05); }
.profile-body .submenu-fracc .opcion-fracc.activo { font-weight: 600; color: #00A901; }
.profile-body .submenu-fracc .cf-check { width: 14px; margin-right: 6px; font-size: .8em; color: #00A901; }

/* ===== Búsqueda global (typeahead) ===== */
#busqueda-global-wrapper { position: relative; }
#busqueda-global-wrapper .busqueda-global-icono {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--color-primario); pointer-events: none;
}
#busqueda-global-input {
    padding-left: 38px; padding-right: 38px; height: 46px; border-radius: 24px;
    border: 1px solid #d9d9d9; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
#busqueda-global-input:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 .15rem rgba(58,170,53,.20);
}
#busqueda-global-clear {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: #999; font-size: 1rem; line-height: 1;
    padding: 4px 8px; cursor: pointer;
}
#busqueda-global-clear:hover { color: #555; }

#busqueda-global-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1050;
    background: #fff; border: 1px solid #e5e5e5; border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    max-height: 60vh; overflow-y: auto; padding: 6px 0;
    text-align: left;
}
#busqueda-global-dropdown .bg-grupo {
    padding: 8px 16px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--color-primario);
}
#busqueda-global-dropdown .bg-grupo .bg-count { color: #aaa; font-weight: 600; }
#busqueda-global-dropdown .bg-item {
    padding: 8px 16px; cursor: pointer; gap: 10px; border-top: 1px solid #f2f2f2;
}
#busqueda-global-dropdown .bg-grupo + .bg-item { border-top: 0; }
#busqueda-global-dropdown .bg-item:hover { background: rgba(58,170,53,.12); }
#busqueda-global-dropdown .bg-avatar { flex: 0 0 auto; }
#busqueda-global-dropdown .bg-avatar img {
    width: 36px !important; height: 36px !important; max-width: 36px !important;
    max-height: 36px !important; object-fit: cover; border-radius: 50%; display: block;
}
#busqueda-global-dropdown .bg-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
#busqueda-global-dropdown .bg-nombre {
    font-weight: 600; color: #2f2f3b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#busqueda-global-dropdown .bg-dir {
    font-size: .8rem; color: #8a8a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#busqueda-global-dropdown .bg-tipo { flex: 0 0 auto; align-self: center; }
#busqueda-global-dropdown .bg-vacio { padding: 16px; text-align: center; color: #999; }

/* ============================================================
   Rediseño B — recuperar altura vertical del chrome para el héroe
   (el título del header y el page-title venían muy grandes/con mucho padding)
   ============================================================ */
header .page-main-header { padding-top: 6px; padding-bottom: 6px; }
header .page-main-header .header-left h1 { font-size: 20px; line-height: 1.2; margin: 0; }
.page-title { padding: 14px 0 !important; }

