/* Estilos compartidos para la cabecera, tooltips y footer
   Extraído de admin-user-content.php para reutilización. */

/* Cabecera fija y menú */
.navbar {
    background: #a3d8f4;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    z-index: 1100;
}

.navbar h2 { margin: 0; font-size: 2em; }

.menu { display: flex; gap: 1rem; margin-right: 3rem; align-items: center; }
.menu a { color: #fff; text-decoration: none; }
.menu a:hover { text-decoration: underline; }

/* Footer fijo */
.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #a3d8f4;
    text-align: center;
    padding: 1rem 0;
    box-shadow: 0 -2px 5px rgba(163,216,244,0.15);
    font-size: 0.7rem;
    color: #fff;
}
.login-footer a { color: #fff; font-size: 0.7rem; }

/* Tooltips declarativos */
[data-tooltip] { position: relative; cursor: pointer; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(-1.6rem - 6px);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform-origin: center top;
    z-index: 2000;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after,
[data-tooltip]:focus-visible::after,
[data-tooltip].tooltip-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 400px) {
    [data-tooltip]::after { bottom: auto; top: calc(100% + 6px); }
}

/* Forzar visibilidad de tooltip */
[data-tooltip].tooltip-visible::after { opacity: 1; transform: translateX(-50%) translateY(-2px); }

/* Ajustes responsive para compensar la cabecera fija */
/* Responsive para navbar */
@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem;
    }

    .navbar h2 { 
        font-size: 1.6rem; 
        margin-bottom: 0.5rem;
    }

    .menu { 
        margin-right: 0;
        gap: 0.8rem;
    }

    .container { margin: 6.5rem auto 0 auto; padding: 1rem; }
}

@media (max-width: 600px) {
    .navbar {
        padding: 0.6rem;
        gap: 0.8rem;
    }

    .navbar h2 { 
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }

    .menu { 
        gap: 0.6rem;
    }

    .menu a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .menu img {
        width: 20px;
        height: 20px;
    }

    .container { margin: 6rem auto 0 auto; padding: 0.8rem; }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
        gap: 0.6rem;
    }

    .navbar h2 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .menu {
        gap: 0.5rem;
    }

    .menu a {
        padding: 0.3rem;
    }

    .menu img {
        width: 18px;
        height: 18px;
    }

    [data-tooltip]::after {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}
