@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/* VARIAVEIS CSS */
:root {
    --header-height: 3.5rem;

    /* cores */
    --first-color: hsl(228, 85%, 63%);
    --title-color: hsl(228, 18%, 16%);
    --text-color: hsl(228, 8%, 56%);
    --body-color: hsl(228, 100%, 99%);
    --shadow-color: hsla(228, 80%, 4%, .1);

    /* typografia */
    /* .5rem = 8px | 1rem = 16px etc... */
    --normal-font-size: .938rem;
    --smaller-fint-size: .75rem;
    --tiny-font-size: .75rem;

    /* font weight */
    --font-regular: 400;
    --font-semi-bold: 600;

    /*  z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

body {
    font-size: var(--normal-font-size) ;
    background-color: var(--body-color);
    color: var(--text-color);
    transition: background-color .4s;
}

a {
    text-decoration: none;
}

/* VARIAVEIS DO MODO DARK */
body.dark-theme {
    --first-color: hsl(228, 70%, 63%);
    --title-color: hsl(228, 18%, 96%);
    --text-color: hsl(228, 12%, 61%);
    --body-color: hsl(228, 24%, 16%);
    --shadow-color: hsla(228, 80%, 4%, .3)
}

.dark-theme .sidebar-content::-webkit-scrollbar {
    background-color: hsl(228, 16%, 30%);
}

.dark-theme.sidebar-content::-webkit-scrollbar-thumb {
    background-color: hsl(228, 16%, 40%);
}


.dark-theme .navbar-toggler-icon {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cpath stroke='white' stroke-width='3' d='M5 10h20M5 20h20'/%3E%3C/svg%3E");
}




/* REUTILIZANDO CLASSES CSS */
.main-container {
    margin-inline: 1.5rem;
    padding-top: 5rem;
}

/* HEADER */

.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: var(--z-fixed);
    margin: .75rem;
}

.header-container {
    width: 100%;
    height: var(--header-height);
    background-color: var(--body-color);
    box-shadow: 0 2px 24px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: background-color .4s;
}

.header-logo {
    display: inline-flex;
    align-items: center;
    column-gap: .25rem;
}

.header-logo img {
    width: 3.5rem;
}

.header-logo span {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
}

.navbar-toggler {
    border: none;
}


/* SIDEBAR */

.sidebar {
    position: fixed;
    right: 120%;
    top: 0;
    bottom: 0;
    z-index: var(--z-fixed);
    width: 288px;
    background-color: var(--body-color);
    box-shadow: 2px 0 24px var(--shadow-color) ;
    padding-block: 1.5rem;
    margin: .75rem;
    border-radius: 1rem;
    transition: left .4s, background-color .4s, width .4s;
}

.sidebar-container,
.sidebar-content {
    display: flex;
    flex-direction: column;
    row-gap: 3rem;
}

.sidebar-container {
    height: 100%;
    overflow: hidden;
}

.sidebar-user {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-items: center;
    column-gap: 1rem;
    padding-left: 2rem;
}


.sidebar-user-img {
    position: relative;
    background-color: var(--first-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    justify-content: center;
}

.sidebar-user-img img {
    position: absolute;
    width: 50px;
    bottom: -1px;
}

.sidebar-user-info h3 {
    font-size: var(--normal-font-size);
    color: var(--title-color);
    transition: color .4s;
}

.sidebar-user-info span {
    font-size: var(--smaller-fint-size);
}

.sidebar-content {
    overflow: hidden auto;
}

.sidebar-content::-webkit-scrollbar {
    width: .4rem;
    background-color: hsl(228, 8%, 85%);
}

.sidebar-container::-webkit-scrollbar-thumb {
    background-color: hsl(228, 8%, 85%);
}

.sidebar-title {
    width: max-content;
    font-size: var(--tiny-font-size);
    font-weight: var(--font-semi-bold);
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.sidebar-list,
.sidebar-action {
    display: grid;
    row-gap: 1.5rem;
}

.sidebar-action button {
    all: unset;
}

.sidebar-link {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2,max-content);
    align-items: center;
    column-gap: 1rem;
    color: var(--text-color);
    padding-left: 2rem;
    transition: color .4s, opacity .4s;
}

.sidebar-link i {
    font-size: 1.25rem;
}

.sidebar-link span {
    font-weight: var(--font-semi-bold);
}

.sidebar-link:hover {
    color: var(--first-color);
}

.sidebar-action {
    padding-left: 2rem;
    margin-top: auto;
}

.sidebar-action button {
    cursor: pointer;
}

.sidebar-theme {
    width: 100%;
    font-size: 1.25rem;
}

.sidebar-theme span {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: var(--normal-font-size);
}

/* show sidebar */
.show-sidebar {
    right: 0;   
}

.show-sidebar span {
    display: none;
}

/* active link */
.active-link {
    color: var(--first-color);
}

.active-link::after {
    content: "";
    position: absolute;
    left: 0;
    width: 3px;
    height: 20px;
    background-color: var(--first-color);
}





/* BREACKPOINTS */
/* mobile  0 - 480px */
@media screen and (max-width: 480px) {
    .header-container {
        padding-inline: 1rem;
    }

    .sidebar {
        width: max-content;
    }

    .sidebar-user-info,
    .sidebar-link span {
        display: none;
    }

    .sidebar-action {
        position: relative;
        left: 18px;
    }

    .sidebar-list {
        position: relative;
        left: 15px;
    }

    #config {
        position: relative;
        left: 30px;

    }

    .sidebar-user,
    .active-link {
        padding-inline: 2rem;
    }

    .sidebar-title {
        padding-inline: .5rem;
        margin-inline: auto;
    }

    .show-sidebar {
        right: 0;
    }

    .ri-settings-3-fill {
        position: relative;
        right: 15px;
    }

    .sidebar-action {
        position: relative;
        right: 15px;
    }

    .btn-on {
        position: relative;
        right: 120px;
    }
}

/* tablets 481px - 1149 */

@media screen and (min-width: 481px) and (max-width: 1049px) {
    .btn-on {
        position: relative;
        right: 270px;
    }

    .sidebar-action,
    .sidebar-link,
    .sidebar-list {
        justify-content: center;
    }

    .sidebar-content h3 {
        position: relative;
        left: 80px;
    }

    .sidebar-user-info span {
        display: block;
    }

    .sidebar-user-info h3 {
        margin-bottom: 0;
    }
}

/* laptops 1050px - 1279px */
@media screen and (min-width: 1050px) and (max-width: 1279px) {
    .header {
        margin: 1rem;
        padding-right: 340px;
        transition: padding .4s;
    }
    .header-container {
        height: calc(var(--header-height) + 2rem);
        padding-inline: 2rem;
    }
    .header-logo {
        order: 1;
    }

    .sidebar {
        right: 0;
        width: 316px;
        margin: 1rem;
    }
        .sidebar-user-info, 
        .sidebar-link span {
        transition: opacity .4s;
    }
        .sidebar-user, 
        .sidebar-title {
        transition: padding .4s;
    }

    .sidebar-title {
        display: none;
    }

    .sidebar-title.active {
        display: block;
    }

    .sidebar-user-img {
        position: relative;
        right: 15px
    }

    .sidebar-user-info {
        position: relative;
        right: 15px;
    }
    

    /* reduzindo sidebar */
    .show-sidebar {
        width: 90px;
    }

    .show-sidebar .sidebar-user {
        padding-right: 1.25rem;
    }

    .show-sidebar .sidebar-title {
        padding-right: 0;
        margin-inline: auto;
    }

    .show-sidebar .sidebar-user-info,
    .show-sidebar .sidebar-link span {
        opacity: 0;
    }

    #main {
        padding-right: 340px;
        padding-top: 8rem;
        transition: padding .4s;
    }

    /* add paddding a direita */
    .left-pd {
        padding-right: 114px;
    }

    
}
/* ultraWide 1280px... */
@media screen and (min-width: 1280px) {

    .header {
        margin: 1rem;
        padding-right: 340px;
        transition: padding .4s;
    }
    .header-container {
        height: calc(var(--header-height) + 2rem);
        padding-inline: 2rem;
    }
    .header-logo {
        order: 1;
    }

    .sidebar {
        right: 0;
        width: 316px;
        margin: 1rem;
    }
        .sidebar-user-info, 
        .sidebar-link span {
        transition: opacity .4s;
    }
        .sidebar-user, 
        .sidebar-title {
        transition: padding .4s;
    }

    .sidebar-title {
        display: none;
    }

    .sidebar-title.active {
        display: block;
    }

    .sidebar-user-img {
        position: relative;
        right: 15px
    }

    .sidebar-user-info {
        position: relative;
        right: 15px;
    }
    

    /* reduzindo sidebar */
    .show-sidebar {
        width: 90px;
    }

    .show-sidebar .sidebar-user {
        padding-right: 1.25rem;
    }

    .show-sidebar .sidebar-title {
        padding-right: 0;
        margin-inline: auto;
    }

    .show-sidebar .sidebar-user-info,
    .show-sidebar .sidebar-link span {
        opacity: 0;
    }

    #main {
        padding-right: 340px;
        padding-top: 8rem;
        transition: padding .4s;
    }

    /* add paddding a direita */
    .left-pd {
        padding-right: 114px;
    }
    
    
}