/*
* @package phpBB Extension - Avatar hover
* @copyright (c) 2026 Fred Rimbert
* GNU GPL v2
*/

#nodal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 999;
}

#nodal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.infoprof {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 400px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);

    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    text-align: center;
}

.infoprof.nodal-active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.nodal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    cursor: pointer;
    font-size: 10px;
    color: #fff;
    background: #3c67e7;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    transition: 0.2s ease;
}

.nodal-close:hover {
    background: #e74c3c;
}

.infoprof dd {
    margin: 0;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

.infoprof dd:last-child {
    border-bottom: none;
}

.nodal-avatar-wrapper {
    flex-shrink: 0;
    text-align: center;
}

.nodal-avatar-wrapper a {
    display: block;
}

.nodal-avatar {
    /*width: 80px;
    height: 80px;*/
    object-fit: cover;
    /*border-radius: 50%;*/
    border: 3px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.nodal-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.nodal-avatar-wrapper {
    position: relative;
    display: inline-flex;
    justify-content: center;
}

/* Avatar rond propre */
.nodal-avatar {
    display: block;
}

/* Tooltip */
.nodal-avatar-hover-text {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);

    background: rgba(78, 94, 131, 0.92);
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;

    white-space: nowrap;
    opacity: 0;
    pointer-events: none;

    transition: opacity 0.18s ease, transform 0.18s ease;
    transition-delay: 0.08s;

    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    z-index: 999;
}

/* Flèche centrée */
.nodal-avatar-hover-text::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);

    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent rgba(25, 25, 25, 0.92) transparent;
}

/* Apparition */
.nodal-avatar-link:hover .nodal-avatar-hover-text {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Dark/Light Toggle extension
---------------------------------------- */
html.phpbb-dark-mode .infoprof { background: none; border: solid aliceblue }
