/* ==========================================================
   AVENMARK CODE PLAYGROUND V1.1
   STYLE SYSTEM
========================================================== */


/* ==========================================================
   RESET
========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html,
body {

    width: 100%;
    height: 100%;

}


body {

    background: #F5F5F2;

    color: #2F2F2F;

    font-family: "Montserrat", sans-serif;

    overflow: hidden;

}



/* ==========================================================
   HEADER
========================================================== */

.app-header {

    height: 80px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 28px;

    background: #F5F5F2;

    border-bottom:

        1px solid rgba(47,47,47,0.12);

}



.brand {

    display: flex;

    align-items: center;

    gap: 15px;

}



.logo {

    width: 50px;

    height: 50px;

    object-fit: contain;

}



.brand h1 {

    font-family: "Montserrat", sans-serif;

    font-size: 22px;

    font-weight: 700;

    color: #2F2F2F;

}



#export-button {

    background: #C47A45;

    color: white;

    border: none;

    border-radius: 999px;

    padding: 10px 22px;

    font-family: inherit;

    font-weight: 600;

    cursor: pointer;

    transition: .25s ease;

}


#export-button:hover {

    transform: translateY(-2px);

    opacity: .9;

}





/* ==========================================================
   MAIN WORKSPACE
========================================================== */

.workspace {

    height: calc(100vh - 80px);

    display: grid;

    grid-template-columns: 230px 1fr 1fr;

    gap: 18px;

    padding: 18px;

}



/* ==========================================================
   PANELS
========================================================== */

.sidebar,
.editor-section,
.preview-section {

    background: white;

    border-radius: 20px;

    border:

        1px solid rgba(47,47,47,0.10);

    box-shadow:

        0 10px 30px rgba(47,47,47,0.06);

    overflow: hidden;

}



/* ==========================================================
   SIDEBAR
========================================================== */

.sidebar-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 20px;

    border-bottom:

        1px solid rgba(47,47,47,0.08);

}



.sidebar-header h2 {

    font-size: 16px;

}



#new-file-button {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    border: none;

    background: #C47A45;

    color: white;

    font-size: 20px;

    cursor: pointer;

}



.file-list {

    padding: 14px;

    display: flex;

    flex-direction: column;

    gap: 8px;

}



.file {

    width: 100%;

    padding: 12px 14px;

    text-align: left;

    border: none;

    border-radius: 12px;

    background: transparent;

    color: #2F2F2F;

    font-family: inherit;

    cursor: pointer;

    transition: .2s ease;

}



.file:hover {

    background:

        rgba(196,122,69,0.12);

}



.file.active {

    background: #2F2F2F;

    color: #F5F5F2;

}





/* ==========================================================
   EDITOR
========================================================== */

.editor-section,
.preview-section {

    display: flex;

    flex-direction: column;

}



.editor-header,
.preview-header {

    height: 60px;

    padding: 0 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:

        1px solid rgba(47,47,47,0.08);

}



.editor-header h2,
.preview-header h2 {

    font-size: 16px;

}



.editor-header span {

    font-size: 13px;

    color: #777;

}



#code-editor {

    flex: 1;

    width: 100%;

    padding: 22px;

    resize: none;

    outline: none;

    border: none;

    background: #2F2F2F;

    color: #F5F5F2;

    font-family:

        "Courier New",
        monospace;

    font-size: 15px;

    line-height: 1.7;

}





/* ==========================================================
   PREVIEW
========================================================== */

#run-button {

    background: #C47A45;

    color: white;

    border: none;

    border-radius: 999px;

    padding: 10px 24px;

    font-family: inherit;

    font-weight: 700;

    cursor: pointer;

    transition: .25s ease;

}



#run-button:hover {

    transform: translateY(-2px);

}



#preview-frame {

    flex: 1;

    width: 100%;

    border: none;

    background: white;

}





/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:1100px) {


    body {

        overflow: auto;

    }


    .workspace {

        height: auto;

        grid-template-columns: 1fr;

    }


    .sidebar,
    .editor-section,
    .preview-section {

        min-height: 450px;

    }


}



@media(max-width:600px) {


    .app-header {

        padding: 0 16px;

    }


    .brand h1 {

        font-size: 16px;

    }


    .logo {

        width: 42px;

        height: 42px;

    }


    #export-button {

        padding: 8px 14px;

    }


}
