/*
* @package phpBB Extension - Avatar hover
* @copyright (c) 2026 Fred Rimbert
* GNU GPL v2
*/

/* =====================================================
   POST PROFILE CLEANUP
===================================================== */

.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 dd {
    display: none;
}

.postprofile .has-avatar .avatar-container {
    margin: 0;
    overflow: inherit;
    float: left;
}

.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;
}


/* =====================================================
   CONTACT BLOCK
===================================================== */

.profile-contact strong,
.profile-contact .dropdown-trigger {
    display: none;
}

.profile-contact .dropdown {
    position: static;
    display: block !important;
    margin: 0 !important;
    padding-top: 0;
}

.profile-contact .dropdown .pointer {
    display: none;
}

.profile-contact .dropdown .dropdown-contents {
    background: none;
    border: 0;
    box-shadow: none;
}

/* Buttons styling */
.profile-contact .dropdown .dropdown-contents a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border-radius: 8px;
    background: #d6e2ea;
    border: 1px solid #0e4ea3;
    transition: all 0.2s ease;
}

.profile-contact .dropdown .dropdown-contents a:hover {
    background: #c7d6e2;
    border-color: #0e4ea3;
    transform: translateY(-1px);
}

.profile-contact .dropdown .dropdown-contents img,
.profile-contact .dropdown .dropdown-contents i,
.profile-contact .dropdown .dropdown-contents svg {
    filter: contrast(1.2) saturate(1.1);
    opacity: 0.95;
}


/* =====================================================
   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 {
    font-size: 12px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.95);
    width: 720px;
    max-width: 95%;
    max-height: 90vh;

    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.95) 0%,
        rgba(242,249,255,0.85) 50%,
        rgba(230,244,255,0.80) 100%
    );

    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    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;
    color: #ffffff !important;
    background: linear-gradient(
        135deg,
        #1e3f63 0%,
        #2a5b8a 50%,
        #346fa8 100%
    ) !important;
    border-bottom: 1px solid rgba(120, 180, 255, 0.25);
    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.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;
    text-align: right;
    background: linear-gradient(
        135deg,
        rgba(15, 40, 80, 0.85) 0%,
        rgba(20, 60, 120, 0.75) 100%
    );
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-top: 1px solid rgba(255,255,255,0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}


/* =====================================================
   LINK SAFETY
===================================================== */

#ss-modal a {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {

    #ss-modal {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 85%;
        height: 80%;
        max-height: 80%;
        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;
    }
}


/* MOBILE LANDSCAPE */

@media (max-width: 1024px) and (orientation: landscape) {

    #ss-modal {
        width: 85%;
        height: 90%;
        max-height: 95%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #ss-modal .ss-content {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   VIEW PROFILE LINK
===================================================== */

.ss-view-profile {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    background: #f0f0f0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: .2s ease;
}

.ss-view-profile:hover {
    background: #e2e2e2;
}


/* =====================================================
   DARK MODE (Stoker Extension)
===================================================== */

html.phpbb-dark-mode .ss-header {
    background: #333;
    background: url("https://rimbertweb.fr/cloud/uploads/29b10c11e50aee3de008b0f004d633fc.png");
}

html.phpbb-dark-mode .ss-footer {
    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;
}

html.phpbb-dark-mode .contact-icons div:last-child a {
    background-color: #333;
}

html.phpbb-dark-mode .ss-view-profile {
    background: #333;
}

html.phpbb-dark-mode .ss-view-profile:hover {
    background: #333;
}