@use 'variables' as *;

.hover-focus1 {
    transition: 0.15s ease-in-out;
}

.hover-focus1:hover:not(.selectedTab) {
    background-color: rgba(26, 26, 26, 0.15) !important;
}

.hover-focus2 {
    transition: 0.15s ease-in-out;
}

.hover-focus2:hover:not(.selectedTab) {
    background-color: rgba(40, 40, 40, 0.25) !important;
}

.sidebar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20vw;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
}

.sidebar-container header {
    display: flex;
    width: 20vw;
    height: 99vh;
    margin: 0;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
    border-radius: 0.4rem;
    position: absolute;
    left: 0.5rem;
    transition: 0.2s ease-in-out;
}

.sidebar-container header.closed {
    background: #13101f;
    border: rgba(31, 31, 31, 0.5) 1px solid;
    position: fixed;
}

.sidebar-container header.closed:not(:hover):not(.hovered) {
    transform: translateX(-120%);
}

.sidebar-container header .page-data {
    width: 95%;
    padding: 0.3rem 0;
}

.sidebar-container header .page-data #controls {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-container header .page-data #controls button {
    background-color: transparent;
    border: none;
    outline: none;
    color: white;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.sidebar-container header .page-data #controls button .tooltip {
    padding: 6.5px 8px;
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: #464141;
    color: rgba(255, 255, 255, 0.834);
    visibility: hidden;
    opacity: 0;
    transition: 0.15s ease;
    border-radius: 5px;
    font-size: 14.5px;
}

.sidebar-container header .page-data #controls button:hover .tooltip {
    visibility: visible;
    opacity: 1;
    top: 28px;
}

.logo-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.sidebar-container header .page-data #controls button .icon {
    font-size: 1.2rem;
    padding: 0.4rem;
    border-radius: 6px;
}

.sidebar-container header .page-data #controls button svg {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 0.5rem;
    margin: 0;
}

.sidebar-container header .page-data #url-form {
    padding: 1rem 0;
    border-bottom: 0.5px solid rgba(247, 205, 205, 0.156);
}

.sidebar-container header .page-data #url-form input {
    background-color: rgba(226, 226, 226, 0.15);
    border: none;
    outline: none;
    color: inherit;
    font: inherit;
    padding: 0.5rem;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 0.8rem;
    width: 100%;
}

.sidebar-container header .page-data #new-tab {
    width: 100%;
    margin-top: 1rem;
    border-radius: 6px;
    background-color: rgba(226, 226, 226, 0.15);
    border: none;
    outline: none;
    color: inherit;
    font: inherit;
    padding: 0.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-container header .page-data #new-tab .icon {
    font-size: 1.2rem;
}

@keyframes slide-in-from-top {
    0% {
        transform: translateY(-150%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slide-out-from-bottom {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-150%);
        opacity: 0;
    }
}

.r-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    width: auto;
    padding: 8px;
    background-color: #1b1b1b;
    border: 1px solid #2c2c2c;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease;
    z-index: 1000;
    color: rgba(255, 255, 255, 0.9);
}

.r-alert p {
    margin: 0;
    font-size: 14.5px;
}

header #tab-list {
    height: 70vh;
    overflow: scroll;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
}

header #tab-list .tab-item {
    position: relative;
    display: flex;
    gap: 0.5rem;
    width: 95%;
    border-radius: 6px;
    background: rgba(226, 226, 226, 0);
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    border: none;
    outline: none;
    padding: 0.5rem;
    font: inherit;
    color: inherit;
    font-weight: 500;
    animation: slide-in-from-top 0.15s ease;
}

header #tab-list .tab-item img {
    height: 1.25em;
}

header #tab-list .tab-item span {
    font: inherit;
    color: inherit;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 80%;
    text-align: left;
}

header #tab-list .tab-item .close {
    position: absolute;
    right: 0.5rem;
    background-color: transparent;
    border: none;
    outline: none;
    border-radius: 2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
    transition: 0.15s ease;
}

header #tab-list .tab-item .close:hover {
    background-color: rgba(226, 226, 226, 0.17);
}

header #tab-list .tab-item .close .close-icon {
    font-size: 1.2rem;
    color: transparent;
    height: 1.2rem;
    width: 1.2rem;
}

header #tab-list .tab-item.selectedTab {
    background: rgba(226, 226, 226, 0.25);
}

header #tab-list .tab-item:hover .close-icon {
    color: rgb(220, 220, 220);
}

@keyframes slide-in-from-top {
    0% {
        transform: translateY(-25%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slide-out-from-bottom {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-25%);
        opacity: 0;
    }
}


#tab-view {
    width: 80vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    right: 0;
    padding: 0;
    margin: 0;
}

#tab-view.full-width {
    width: 100vw;
}

#tab-view .tab-frame {
    height: 97%;
    width: 98%;
    background-color: white;
    border-radius: 8px;
    border: none;
    outline: none;
}

#small-screen-overlay {
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: none;
    z-index: 2000;
}

#small-screen-overlay p {
    margin: 0 auto;
    width: 50%;
    font-size: 20px;
}

@media (max-width: 600px) {
    #small-screen-overlay {
        display: flex;
    }
}

#menu-overlay {
    position: fixed;
    top: 48px;
    left: 0;
    width: calc(20vw + 10px);
    height: calc(100% - 48px);
    background-color: #000000;
    transform: translateX(-100%);
    transition: 0.15s ease;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

#menu-overlay.active {
    transform: translateX(0);
}

.option {
    color: white;
    margin-bottom: 5px;
    cursor: pointer;
    padding: 0.5rem;
    background: rgba(226, 226, 226, 0.15);
    transition: 0.15s ease;
    border-radius: 6px;
    width: 95%;
}

.option:hover {
    background: rgba(226, 226, 226, 0.17);
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
}