"/*
* @package phpBB Extension - Avatar hover
* @copyright (c) 2026 Fred Rimbert
* GNU GPL v2
*/

/* =========================================
   Hide profile information in posts
   ========================================= */
.postbody { position: inherit }

.postprofile, .postbody, .search .postbody {
    display: block;
    width: auto;
    float: none;
    padding: 0;
    min-height: 0
}

.post .postprofile {
    width: auto;
    text-align: left;
    border-width: 0 0 1px 0;
    padding-bottom: 5px;
    margin: 0 0 5px 0;
    min-height: 40px;
    overflow: hidden
}

.postprofile dt, .postprofile dd.profile-rank, .search .postprofile dd {
    display: block;
    margin: 0}

.postprofile .has-avatar .avatar-container {
    margin: 0;
    overflow: inherit;
    float: left
}

.postprofile dd { display: none}
.postprofile .avatar-container:after { clear: none }

.postprofile .avatar { margin-right: 5px }

.postprofile .avatar img {
    width: 40px !important;
    height: 40px !important;
}

.postprofile .avatar.avatar-letter { border: 3px solid #dedede; }

.has-profile .postbody h3 {
    margin-left: 0 !important;
    margin-right: 0 !important 
}

.has-profile .post-buttons {
    right: 30px;
    top: 15px
}

/* PROFIL ONLINE/OFFLINE
*****************************/
.online { background-image: none }

@keyframes onlinePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(3, 219, 39, 0.8);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(3, 219, 39, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(3, 219, 39, 0);
    }
}

.online img.avatar,
.online .avatar-none {
    border-color: #03DB27;
    border-radius: 50px;
    animation: onlinePulse 1.8s infinite;
}


/* contact
--------------------------------------------------- */
.profile-contact {

    & strong, .dropdown-trigger {
        display: none;
    }
    & .dropdown {
        position: static;
        display: block !important;
        margin: 0 !important;
        padding-top: 0;

        & .pointer {
            display: none;
        }
        & .dropdown-contents {
            background: none;
            border: 0;
            box-shadow: none;

            & a:first-child {
                padding-inline-start: 0;
            }
        }
    }
}


/* =========================================
   OVERLAY
========================================= */

#ss-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    backdrop-filter:blur(4px);
    opacity:0;
    visibility:hidden;
    transition:.25s;
    z-index:99998;
}

#ss-overlay.active{
    opacity:1;
    visibility:visible;
}


/* =========================================
   MODAL CONTAINER
========================================= */

#ss-modal{
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%) scale(.95);

    width:720px;
    max-width:95%;
    max-height:90vh;

    background:#fff;
    border-radius:14px;
    box-shadow:0 30px 80px rgba(0,0,0,.35);

    opacity:0;
    visibility:hidden;
    transition:.25s ease;

    overflow:hidden;
    z-index:99999;
}

#ss-modal.active{
    opacity:1;
    visibility:visible;
    transform:translate(-50%, -50%) scale(1);
}

body.ss-open{
    overflow:hidden;
}


/* =========================================
   HEADER
========================================= */

.ss-header{
    position:relative;
    padding:25px 30px;
    height: 80px;
    background:url("./images/cloud.webp") center/cover no-repeat;
    color:#fff;
}

.ss-header::after{
    content:"";
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.4);
    pointer-events:none;
}

.ss-header > *{
    position:relative;
    z-index:2;
}

.ss-close{
    position:absolute;
    top:15px;
    right:20px;
    cursor:pointer;
}

.ss-label{
    font-weight:600;
    font-family: 'Asap Condensed','Arial','Helvetica',sans-serif;
    letter-spacing: .4px;
    line-height: normal;
    font-size: 18px;
}


/* =========================================
   BODY GRID
========================================= */

.ss-body{
    display:grid;
    grid-template-columns:280px 1fr;
    gap:40px;
    padding:35px;
}


/* =========================================
   LEFT COLUMN
========================================= */

.ss-left{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
}

.ss-left .avatar-container{
    margin-bottom:12px;
}

.ss-left img{
    max-width:100%;
    height:auto;
    object-fit:contain;
    display:block;
}

.ss-left a:not(.avatar),
.ss-left strong{
    display:block;
    margin-top:6px;
    text-align:center;
    font-size: 14px;
    font-weight: bolder;
}


/* =========================================
   RIGHT COLUMN
========================================= */

.ss-right{
    display:flex;
    flex-direction:column;
    gap:10px;
}


/* =========================================
   FOOTER
========================================= */

.ss-footer{
    padding:20px 30px;
    background:#f7f7f7;
    text-align:right;
}


/* =========================================
   LINK SAFETY
========================================= */

#ss-modal a{
    position:relative;
    z-index:3;
    pointer-events:auto;
}

@media (max-width:768px){

    #ss-modal{
        position:fixed;

        top:50%;
        left:50%;
        transform:translate(-50%, -50%);

        width:95%;
        max-width:95%;
        max-height:85vh;

        overflow-y:auto;
        border-radius:16px;
    }

    .ss-body{
        grid-template-columns:1fr;
        gap:20px;
    }

    .ss-left{
        justify-content:flex-start;
        padding-bottom:15px;
        border-bottom:1px solid #eee;
    }

    .ss-footer{
        text-align:center;
    }
}

/* Lien voir profil sous pseudo */
.ss-view-profile{
    display:inline-block;
    margin-top:12px;
    padding:6px 14px;
    background:#f0f0f0;
    color:#333;
    font-size:13px;
    font-weight:600;
    text-decoration:none;
    border-radius:6px;
    transition:.2s ease;
}

.ss-view-profile:hover{
    background:#e2e2e2;
}


/* Dark/Light Toggle extension by stoker
--------------------------------------------------- */
html.phpbb-dark-mode .ss-header { background: #333 }
html.phpbb-dark-mode .ss-content dd { color: #eee }
html.phpbb-dark-mode #ss-modal { background: #222 }
html.phpbb-dark-mode .ss-profile-btn { color: #eee }
html.phpbb-dark-mode .ss-profile-btn:hover { color: #fff }
