/*!
 * This file is a part of ts-website 2
 * https://github.com/Wruczek/ts-website
 * (c) Wruczek 2017 - 2019
 */

body {
    position: relative;
    padding-top: 90px;
    padding-bottom: 6rem;
    min-height: 100vh;
    font-size: 15px;
}

.connectionproblems {
    margin-top: 1rem;
}

.fa, .fas, .fab, .far, .fal {
    margin-right: 0.5em
}

.dropdown-menu .dropdown-item {
    cursor: pointer;
}

.card {
    margin-bottom: 1rem;
}

.accordion .card {
    margin-bottom: 0;
}

.accordion .card .card-header {
    padding: .5rem !important;
}

.card .card-header * {
    margin-bottom: 0;
}

.bottom-error-alert {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
    text-align: center;
    z-index: 998;
}

.card-titleblock {
    margin-bottom: 1.5rem !important;
}

.card-titleblock .card-header {
    text-align: center;
    border: 0;
    font-size: 1.2rem;
}

.footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    background-color: #f8f9fa;
    padding: 0.8rem;
    font-size: 1rem;
    line-height: 2em;
}

.footer .footer-copyright {
    font-size: 0.75rem;
}

/* Fixes https://github.com/twbs/bootstrap/issues/23374 */
@media (max-width: 991px) {
    .nav-fix-scroll {
        overflow: auto;
        max-height: 85vh;
        align-items: flex-start;
    }
}

/* Reimplement the btn-xs that was removed in Bootstrap 4 */
/* https://github.com/twbs/bootstrap/issues/21881#issuecomment-341972830 */
.btn-group-xs > .btn, .btn-xs {
    padding: .25rem .4rem;
    font-size: .875rem;
    line-height: .5;
    border-radius: .2rem;
}

/* ACCORDION */

.accordion .card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion .card .card-header .btn-link {
    text-decoration: none;
    text-align: inherit;
    white-space: normal;
}

.accordion .card .card-header .copy-faq-url {
    transition: opacity ease 250ms;
    margin: 0 0.75rem 0 0;
    cursor: pointer;
}

.accordion .card:not(:hover) .card-header .copy-faq-url {
    opacity: 0;
}

/* Page/element specific */

.badge.error-badge {
    white-space: normal;
    font-size: 1em;
    font-weight: normal;
}

/* Server status */

.server-status.loaded .status-loader {
    display: none;
}

.server-status p {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 0.1rem;
}

.server-status .data span:first-child {
    white-space: nowrap;
}

.server-status .data span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Login modal */

#loginModal .select-account .list-group .list-group-item {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-button {
    max-width: 150px;
}

#loginModal-codeconfirm .invalid-feedback {
    margin-top: 0.5rem;
    font-size: 100%;
}

#loginModal .loginDebugInfo {
    position: absolute;
    bottom: 3px;
    right: 3px;
    line-height: 1em;
}

/* Bans page */

.ban-alert {
    margin-bottom: 2rem;
}

.ban-alert.banned {
    display: flex;
    align-items: center;
}

.bans-highlight {
    color: #e83e8c;
    font-family: var(--font-family-monospace);
}

/* Responsive DataTables styles */

table.dataTable>tbody>tr.child ul.dtr-details>li:first-child {
    padding-top: 0;
}

table.dataTable > tbody > tr.child span.dtr-title {
    display: inline-block;
    min-width: 75px;
    font-weight: bold;
}

table.dataTable>tbody>tr.child ul.dtr-details {
    display: inline-block;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

table.dataTable>tbody>tr.child ul.dtr-details>li {
    padding: 0.5em 0;
}

table.dataTable > tbody > tr.parent td {
    background-color: #282840
}

table.dataTable > tbody > tr.child td.child {
    background-color: #2d2d4b
}

.dataTables_info {
    white-space: normal !important
}

/* Viewer */

.viewer-container {
    font-size: 14px;
}

.viewer-container .channel-container:not(.is-server), .viewer-container .client-container {
    margin-left: 1.4em;
}

.viewer-container .channel-container:not(.is-spacer) .channel, .viewer-container .client-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-container .channel-container:not(.is-spacer) > .channel > .channel-name,
.viewer-container .channel-container:not(.is-spacer) > .channel > .channel-icons,
.viewer-container .client-name, .viewer-container .client-icons {
    display: flex;
    align-items: center;
}

.viewer-container .channel-container:not(.is-spacer) > .channel > .channel-name,
.viewer-container .client-name {
    word-break: break-all;  /* For all browsers */
    word-break: break-word; /* For some browsers that support it - unofficial! */
}

.viewer-container .client-icons {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.viewer-container .client-icons .icon,
.viewer-container .client-icons .icon-flag,
.viewer-container .channel-icons .icon {
    margin-left: 0.5em;
}

.viewer-container .channel-container:not(.is-spacer) .channel,
.viewer-container .client-container {
    position: relative;
    z-index: 0;
    cursor: pointer;
}

.viewer-container .channel-container:not(.is-spacer) .channel::after,
.viewer-container .client-container::after {
    content: "";
    z-index: -1;

    position: absolute;
    top: -3px;
    left: -10px;
    bottom: -3px;
    right: -10px;

    border-radius: 4px;
    background-color: rgba(0, 0, 0, .15);
    opacity: 0;
    transition: opacity ease 300ms;
}

.viewer-container .channel-container:not(.is-spacer) .channel:hover::after,
.viewer-container .client-container:hover::after,
.viewer-container .channel-container:not(.is-spacer) .channel:focus::after,
.viewer-container .client-container:focus::after {
    opacity: 1;
}

.viewer-container .channel-name .icon, .viewer-container .client-name .icon {
    margin-right: 0.5em;
}

.viewer-container .icon {
    height: 16px;
    max-width: 16px;
}

.viewer-container .channel-container.spacer-left > .channel {
    text-align: left;
}

.viewer-container .channel-container.spacer-center > .channel {
    text-align: center;
}

.viewer-container .channel-container.spacer-right > .channel {
    text-align: right;
}

.viewer-container .channel-container.spacer-repeat > .channel {
    overflow: hidden;
    white-space: nowrap;
}

/* Make sidebar stretch to match main content height - ONLY on profile page */
/* Make sidebar stretch to match main content height - ONLY on profile page */
@media (min-width: 992px) {
    body.page-profile.has-discord-widget .container > .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    body.page-profile.has-discord-widget .container > .row > .col-lg-3 {
        display: flex;
        flex-direction: column;
    }
    
    body.page-profile.has-discord-widget .sidebar-wrapper {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    
    body.page-profile.has-discord-widget .sidebar-wrapper .card:last-child {
        margin-top: auto;
    }
}


/* Admin status sidebar */

.admin-status.admin-status-grouped .group-name {
    /* Center icon with text (vertical & horizontal) */
    display: flex;
    justify-content: center;
    align-items: center;

    font-family: var(--font-family-main);
    font-size: 1.3em;
}

.admin-status.admin-status-grouped .group-name {
    margin: 1em 0 0.1em 0;
}

.admin-status.admin-status-grouped .empty-group {
    text-align: center;
    font-style: italic;
}

/* No top spacing on the first group */
/* That's why I've put that extra DIV that wraps all groups */
.admin-status.admin-status-grouped div:first-child .group-name {
    margin-top: 0;
}

.admin-status.admin-status-grouped .group-name img,
.admin-status.admin-status-list .nickname img {
    height: 16px;
    max-width: 16px;
    margin-right: 0.25em;
}

.admin-status.admin-status-list .group-separator {
    margin: 1.25em 0;
}

.admin-status .status-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.1em;
}

.admin-status .status-container .nickname {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Group assigner */

.group-assigner .list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.group-assigner .list-group-item > div {
    display: flex;
    align-items: center;
}

/* The "icon-margin" is used when there is no icon, */
/* its used to align it with other groups */
.group-assigner .assigner-icon, .group-assigner .assigner-icon-margin {
    width: 16px;
    max-height: 16px;
    margin-right: 0.3em;
}

.group-assigner .list-group-item:not(.assigner-header) {
    cursor: pointer;
    background-color: #1b1b1b;
}

.group-assigner .assigner-category {
    margin-bottom: 1.5rem;
    border-radius: .25rem;
    overflow: hidden;
}

.group-assigner .assigner-save {
    width: 200px;
    max-width: 100%;
}

.group-assigner .assigner-header .badge.badge-invalid {
    background-color: red !important
}

/* Profile page */
.steamlike-header {
    position: relative;
    margin-bottom: 1rem;
    background: #222;
    color: #c7d5e0;
    border: none;
}

/* Badges */
.badge-primary {
    background-color: #181818;
    border-color: #181818;
}
.steamlike-header .cover {
    height: 180px;
    background: linear-gradient(90deg, rgb(23, 23, 23) 0%, rgb(29, 29, 29) 50%, rgb(23, 23, 23) 100%);
}
.steamlike-header .avatar-and-meta {
    padding: 1rem;
}

.avatar-preview {
    position: relative;
}

.avatar-preview .avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.1);
    object-fit: cover;
    display: block;
    background-color: #0f141a;
}

.avatar-preview .avatar-border-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 120px;
    height: 120px;
    object-fit: contain;

    pointer-events: none;
    user-select: none;
}

.avatar-preview--sm {
    width: 90px;
    height: 90px;
}

.avatar-preview--sm .avatar-img {
    width: 64px;
    height: 64px;
}

.avatar-preview--sm .avatar-border-overlay {
    width: 90px;
    height: 90px;
}

.steamlike-header .avatar-preview .avatar-img {
    border-color: rgba(255,255,255,0.15);
    background-color: rgba(0,0,0,0.4);
}

.border-options {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.border-option {
    flex: 1 1 200px;
    max-width: 240px;
    margin: 0.5rem;
    position: relative;
    cursor: pointer;
}

.border-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.border-option__body {
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    padding: 0.75rem;
   
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.border-option:hover .border-option__body {
    border-color: #80bdff;
}

.border-option input[type="radio"]:checked + .border-option__body {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.2);
}
.steamlike-header .nickname {
    color: #e5f0f6;
}

/* Online/offline pulsating dot */
.status-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50%;
    margin-left: .4rem;
    position: relative;
}
.status-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 1.8s ease-out infinite;
}
.status-dot.green { background: #28a745; }
.status-dot.green::after { box-shadow: 0 0 0 0 rgba(40,167,69,0.6); }
.status-dot.gray { background: #6c757d; }
.status-dot.gray::after { box-shadow: 0 0 0 0 rgba(108,117,125,0.6); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0,0,0,0.3); }
    70% { box-shadow: 0 0 0 8px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}


/* Discord status colors */
.status-dot.discord-online { background: #43b581; }
.status-dot.discord-online::after { box-shadow: 0 0 0 0 rgba(67,181,129,0.6); }
.status-dot.discord-idle { background: #faa61a; }
.status-dot.discord-idle::after { box-shadow: 0 0 0 0 rgba(250,166,26,0.6); }
.status-dot.discord-dnd { background: #f04747; }
.status-dot.discord-dnd::after { box-shadow: 0 0 0 0 rgba(240,71,71,0.6); }
.status-dot.discord-offline { background: #747f8d; }
.status-dot.discord-offline::after { box-shadow: 0 0 0 0 rgba(116,127,141,0.6); }


/* Discord widget */
.profile-description-row {
    align-items: stretch;
}

.discord-widget {
    background: #23272a;
    color: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    height: 100%;
}

.discord-widget.card-accent {
    border: none;
}

.discord-widget__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #b9bbbe;
}

.discord-widget__status {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
}

.discord-widget__status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.35rem;
    background: #747f8d;
}

.discord-widget__status-dot.online { background: #43b581; }
.discord-widget__status-dot.idle { background: #faa61a; }
.discord-widget__status-dot.dnd { background: #f04747; }
.discord-widget__status-dot.offline { background: #747f8d; }

.discord-widget__body {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    margin-top: 0.75rem;
}

.discord-widget__body:hover {
    text-decoration: none;
    color: #fff;
}

.discord-widget__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-right: 0.85rem;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

.discord-widget__display-name {
    font-weight: 600;
    font-size: 1rem;
}

.discord-widget__username {
    color: #b9bbbe;
    font-size: 0.85rem;
}

.discord-widget__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.discord-widget--loading .discord-widget__status-text::after {
    content: "Updating...";
    margin-left: 0.35rem;
    font-size: 0.7rem;
    color: #b9bbbe;
    text-transform: none;
    letter-spacing: normal;
}

.discord-widget--error .discord-widget__status-text {
    color: #ff9aa2;
}

.discord-widget--error .discord-widget__username {
    color: #ffbac7;
}

@media (max-width: 991px) {
    .discord-widget {
        margin-top: 0.5rem;
    }
}

/* Nickname style effects */
.steamlike-header .nickname.nickname-style1 {
    background: url(https://reape.rs/sparkle.gif);
    color: #ffffff;
    font-weight: 600;
    -webkit-animation: apollochange 20s infinite alternate;
    animation: apollochange 20s infinite alternate;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    max-width: fit-content;
}

.steamlike-header .nickname.nickname-style2 {
    color: white;
    text-shadow: 0px 2px 2px #03c8ff;

}

.steamlike-header .nickname.nickname-style3 {
    background: transparent url('https://i.ibb.co/qjs2j2X/clip-transparent-sparkle-gif-4.gif');
    color: #FFFFFF;
    text-shadow: 0px 2px 2px #cee9f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    max-width: fit-content;
}

@keyframes apollochange {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@-webkit-keyframes apollochange {
    0% { -webkit-filter: hue-rotate(0deg); }
    100% { -webkit-filter: hue-rotate(360deg); }
}

/* Edit profile customization styles */
.nickname-style-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.nickname-style-option {
    cursor: pointer;
    margin: 0;
}

.nickname-style-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nickname-style-preview {
    border: 2px solid #ced4da;
    border-radius: 0.5rem;
    padding: 1rem;
    
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nickname-style-option:hover .nickname-style-preview {
    border-color: #80bdff;
}

.nickname-style-option input[type="radio"]:checked + .nickname-style-preview {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.2);

}

.nickname-style-preview .preview-text {
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.nickname-preview-style1 {
    background: url(https://reape.rs/sparkle.gif);
    color: #ffffff;
    -webkit-animation: apollochange 20s infinite alternate;
    animation: apollochange 20s infinite alternate;
}

.nickname-preview-style2 {
    color: #000;
    text-shadow: 0px 2px 2px #03c8ff;
}

.nickname-preview-style3 {
    background: transparent url('https://i.ibb.co/qjs2j2X/clip-transparent-sparkle-gif-4.gif');
    color: #000;
    text-shadow: 0px 2px 2px #03c8ff;
}
