/* Background videos */
.background_josef {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background_image__overlay {
    pointer-events: none;
}

/* team */
.rank_group {
    margin-bottom: 84px;
}

.rank_group > header {
    margin-bottom: 42px;
}

.rank_group > header > :first-child {
    display: block;
    font-size: 1.875em;
    font-weight: bold;
}

.rank_group > header > :last-child {
    display: block;
    font-size: 1em;
    font-weight: normal;
    line-height: 0.9;
}

.rank_group > main {
    display: grid;
    grid-template-columns: repeat(auto-fill, 288px);
    align-items: center;
    gap: 1em;
}

@media (max-width: 912px) {
    .rank_group > main {
        justify-content: center;
        gap: 1.5em;
    }

    .rank_group > header {
        text-align: center;
    }

    .rank_group > header > :last-child {
        line-height: 1.4;
        opacity: 0.9;
    }
}

.rank {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    border-radius: var(--border-radius-medium);
    background: linear-gradient(
            180deg,
            transparent 0%,
            var(--gray-500) 80%
    );
}

.rank__edit_icon,
.rank__delete_icon,
.rank__social_edit_icon {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    user-select: none;
}

.rank__edit_icon {
    right: calc(20px + (1 * 25px));
}

.rank__delete_icon {
    right: calc(20px + (2 * 25px));
}

.rank__edit_icon:hover,
.rank__delete_icon:hover,
.rank__social_edit_icon:hover {
    filter: brightness(0.8);
    transform: translateY(2px);
}

.rank.add {
    display: grid;
    place-items: center;
    background: transparent;
    cursor: pointer;
    border: 1px solid transparent;
}

.rank.add:hover {
    border: 1px solid white;
}

.rank__avatar {
    width: 74px;
    height: 74px;
    margin-bottom: 1.25em;
    border-radius: var(--border-radius-medium);
}

.rank__name, .rank__uuid {
    font-size: 1.25em;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
}


.rank__task {
    font-size: 1em;
    font-weight: normal;
    opacity: var(--text-opacity-contrast);
}

.rank__socials {
    margin-top: 0.3em;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
}

.rank__social {
    position: relative;
}

.rank__social .tooltip {
    position: absolute;
    z-index: 5;
    bottom: 115%;
    left: 50%;
    translate: -50% 0;
    width: max-content;
    padding: 0.6em;
    font-size: 0.85em;
    visibility: hidden;
    opacity: 0;
    background-color: rgba(var(--rgb-gray-800), 0.8);
    backdrop-filter: blur(5px);
    border-radius: var(--border-radius-small);
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);

    transition: visibility 200ms, opacity 200ms;
}

.rank__social:hover .tooltip,
.rank__social .tooltip:hover {
    visibility: visible;
    opacity: 1;
    transition-delay: 0.75s;
}

.rank__social__href {
    display: block;
    filter: brightness(0.9);
    transition: scale 100ms, filter 100ms;
}

.rank__social:hover .rank__social__href {
    scale: 1.02;
    filter: brightness(1);
}

.rank.edit .rank__avatar_wrapper {
    position: relative;
    margin-bottom: 1.25em;
}

.rank.edit .rank__avatar_overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border-radius: var(--border-radius-medium);
}

.rank.edit .rank__avatar_wrapper:hover .rank__avatar_overlay {
    display: block;
}

.rank.edit .rank__avatar {
    width: 74px;
    height: 74px;
    margin-bottom: 0 !important;
    border-radius: var(--border-radius-medium);
}

.rank.edit .rank__avatar_upload_icon {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
}

.rank.edit .rank__name,
.rank.edit .rank__uuid {
    width: calc(100% - 1em);
    font-size: 1em;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5em;
    margin-top: 5px;
}

.rank.edit .rank__task,
.rank.add .rank__task {
    width: calc(100% - 1em);
    font-size: 1em;
    font-weight: normal;
    opacity: var(--text-opacity-contrast);
    margin-top: 5px;
    background-color: rgba(0, 0, 0, 0.4);
}

.rank.edit .rank__socials,
.rank.add .rank__socials {
    display: none;
}

#rank__edit_template {
    display: none;
}