/* RESET */
* {
    border: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
button {
    border: initial;
    background: initial;
    font: inherit;
    color: inherit;
    outline: none;
}

/* Base styles */
.app {
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    color: #fff;
    height: 100vh;
    width: 100vw;
}
.app__container {
    height: calc(100vh - 55px);
    display: flex;
}

/* Style */
.header {
    background-image: linear-gradient(to right, #18A0BE, #622DB9);
    height: 55px;
    display: flex;
}

.logo {
    margin-left: 20px;
    margin-right: 30px;
    align-self: center;
    animation: fade-in-from-top 0.5s;
}

.dd-toggle {
    color: rgba(255, 255, 255, 0.7);
    padding: 0 13px;
    cursor: pointer;
    transition: all 0.6s;
    animation: fade-in-from-top 0.5s;
}
.dd-toggle:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.07);
}
.dd-toggle:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.07);
}
/* left column (my version) */
.left {
    margin-left: auto;
}
/*  */
.dd-toggle:last-child {
    display: flex;
    align-items: center;
}
.dd-toggle__icon {
}
.dd-toggle__img {
    margin-right: 7px;
    height: 30px;
    width: 30px;
    object-fit: cover;
    border-radius: 50%;
}
.dd-toggle__text {
}
/* Sidebar */
.sidebar {
    background-color: #10171A;
    width: 75px;
    display: flex;
    flex-direction: column;
}
.menu {

}
.menu__button {
    padding: 19px 0;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: all 0.5s;
    animation: fade-in-from-left 0.5s;
}
.menu__button:hover {
    background-color: #2B363B;
    color: #fff;
    cursor: pointer;
}
.menu__button:focus {
    background-color: #2B363B;
    color: #fff;
    cursor: pointer;
}
.menu__button--active {
    background-color: #2B363B;
    color: #fff;
    /* position: relative; */
    border-left: 3px solid #375BB6;;
}
/* .menu__button--active::before {
    content:'';
    width: 3px;
    height: 100%;
    background-color: #375BB6;
    position: absolute;
    top: 0;
    left: 0;
} */
.menu__icon {
    font-size: 18px;
    margin-bottom: 5px;
}
.menu__text {
    font-weight: 500;
    font-size: 12px;
}
.footer {
    margin-top: auto;
    margin-bottom: 60px;
    transform: rotate(-90deg);
}
.copyright {
    color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
    white-space: nowrap;
    text-transform: uppercase;
}
/* Panel */
.panel {
    background-color: #2B363C;
    width: 350px;
    padding: 15px 31px;
}
.panel__top {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #4b5155;
    padding-bottom: 12px;
}
.first-heading {
    font-size: 18px;
    font-weight: 400;
}
.panel__collapse-icon {
    color: #6B7276;
    cursor: pointer;
    margin-left: auto;
}
.panel__images {
    padding: 25px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.panel__img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    animation: fade-in 1s;
}
.panel__img:nth-child(2){
    animation: fade-in 1s 0.1s backwards;
}
.panel__img:nth-child(3){
    animation: fade-in 1s 0.2s backwards;
}
.panel__img:nth-child(4){
    animation: fade-in 1s 0.3s backwards;
}
.panel__img:nth-child(5){
    animation: fade-in 1s 0.4s backwards;
}
/* .panel__img:nth-child(6){
    animation: fade-in 1s 0.5s backwards;
} */
.panel__img:hover {
    transform: scale(1.05);
}
.panel__btn {
    width: 140px;
    height: 140px;
    border-radius: 7px;
    background-color: #333e44;
    cursor: pointer;
    transition: all 0.2s;
    animation: fade-in 1s 0.5s backwards;
}
.panel__btn:hover,
.panel__btn:focus {
    background-color: #404c52;
}
.panel__upload-icon {
    font-size: 25px;
    color: #21292d;
}
/* Main */
.main {
    background-color: #EDF1F3;
    flex: 1;
}
.info-bar {
    height: 50px;
    background-color: #fff;
    border-bottom: 1px solid #D6DDE1;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.breadcrumbs {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}
.breadcrumbs__link {
    color: #A6ADB1;
    text-decoration: none;
}
.breadcrumbs__icon {
    color: #A6ADB1;
    margin: 0 13px;
}
.breadcrumbs__name {
    color: #2E3335;
    font-weight: 500;
}
.button {
    background-color: #375BB6;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.4s;
}
.button:hover,
.button:focus {
    background-color: #26438D;
}
.board {
    height: calc(100vh - 50px - 55px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px;
    column-gap: 20px;
}
.canvas {
    height: 57.5vh;
    width: 48.6vw;
    position: relative;
    border: 1px solid #fff;
    border-radius: 3px;
}
.canvas__bg-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0.15;
}
.canvas__fg-img {
    height: 75%;
    width: 78%;
    border-radius: 3px;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #fff;
    cursor: grab;
    animation: zoom-out 1s 0.2s backwards;
}
.canvas__circle {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    background-color: #fff;
    position: absolute;
    animation: fade-in 1s 1s backwards;
}
.canvas__circle:nth-of-type(1) {
    top: 11.5%;
    left: 10.4%;
    cursor: nw-resize;
}
.canvas__circle:nth-of-type(2) {
    top: 11.5%;
    right: 10.4%;
    cursor: sw-resize;
}
.canvas__circle:nth-of-type(3) {
    bottom: 11.5%;
    left: 10.4%;
    cursor: sw-resize;
}
.canvas__circle:nth-of-type(4) {
    bottom: 11.5%;
    right: 10.4%;
    cursor: nw-resize;
}
.tools {
    height: 57.5vh;
    display: flex;
    flex-direction: column;
    row-gap: 5px;
    animation: fade-in-from-right 0.5s;
}
.tool {
    background-color: #E1E6E9;
    height: 44px;
    width: 44px;
    border-radius: 8px;
    color: #404446;
    cursor: pointer;
    transition: all 0.4s;
} 
.tool--active {
    background-color: #2B363B;
    color: #fff;
}
.tool:last-child {
    margin-top: auto;
}
.tool:hover, 
.tool:focus {
    background-color: #2B363B;
    color: #fff;
}

/* Keyframes */
@keyframes fade-in-from-top {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fade-in-from-left {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@keyframes fade-in-from-right {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes zoom-out {
    0% {
        height: 100%;
        width: 100%;
    }
    100% {
        height: 75%;
        width: 78%;
    }
}

/* Media queries */
@media (max-width: 1200px) {
    .panel {
        display: none;
    }
    .canvas {
        width: 67vw;
    }
}

@media (max-width: 1000px) {
    .app__container {
        /* height: initial; */
        /* min-height: 100vh; */
    }
    .sidebar {
        display: none;
    }
    .info-bar {
        padding: 0 20px;
    }
    .board {
        padding: 50px 20px;
        margin-top: 0;
        height: initial;
    }
    .canvas {
        /* width: initial; */ /* UPDATE: Chrome changed functioning of 'width: initial' for canvas HTML elements, use 100% instead (see below) */
        width: 100%;
        height: 500px;
    }
    .tools {
        height: 500px;
    }
}

@media (max-width: 580px) {
    .dd-toggle:nth-of-type(1),
    .dd-toggle:nth-of-type(2),
    .dd-toggle:nth-of-type(3) {
        display: none;
    }
    .board {
        flex-direction: column;
    }
    .canvas {
        order: 2;
        height: 450px;
    }
    .canvas__circle:nth-of-type(1) {
        top: 11.5%;
        left: 9.8%;
    }
    .canvas__circle:nth-of-type(2) {
        top: 11.5%;
        right: 9.8%;
    }
    .canvas__circle:nth-of-type(3) {
        bottom: 11.5%;
        left: 9.8%;
    }
    .canvas__circle:nth-of-type(4) {
        bottom: 11.5%;
        right: 9.8%;
    }
    .tools {
        flex-direction: row;
        column-gap: 5px;
        order: 1;
        height: initial;
        width: 100%;
        margin-bottom: 15px;
        align-self: start;
    }
    .tool:last-child {
        margin-left: auto;
    }
}

@media (max-width: 440px) {
    .header {
        justify-content: space-between;
    }
    .dd-toggle:nth-of-type(4),
    .dd-toggle:nth-of-type(5) {
        display: none;
    }
    .breadcrumbs__link,
    .breadcrumbs__icon {
        display: none;
    }
    .canvas {
        height: 400px;
    }
}