header, nav {
    box-sizing: border-box;
    transition: 0.2s ease-out;
}

header {
    width: 100%;
    height: 45px;

    display: flex;
    position: fixed;

    background-color: var(--header);
}

nav {
    width: 100%;
    max-width: 1100px;

    height: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;
    
    background-color: var(--header-on);
    border: 0.89px solid var(--button-border);

    margin-left: auto;
    margin-right: auto;
    padding: 0 0 0 10px;
}

@media (max-width:780px) {
    header, nav {
        height: 60px;
    }
    nav {padding: 0;}
}

#logotext {
    width: 200px;
    height: 30px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
    background-color: var(--bg-editor);
    border-top:  0.89px solid var(--button-border);
    border-bottom:  0.89px solid var(--button-border);

    display: flex;
    align-items: center;

    resize: none;
    outline: none;
    box-sizing: border-box;
    padding-top: 2px;

    transition: 0s ease-out, opacity 0.1s ease-out, background-color 0.25s ease-out;
}

#logotext:focus {
    background-color: var(--bg-editor-focus);
}

@media (max-width:780px) {
    #logotext {
        font-size: 24px;
        height: 60px;
    }
}

.buttons {
    width: 90px;
    height: 45px;

    display: flex;
    transition: 0.2s ease-out;
}

.save-button {
    width: 45px;
    height: 45px;

    background-color: var(--button-bg);
    border: 0.89px solid var(--button-border);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s ease-out;
}

.save-button:hover {background-color: var(--button-bg-hover); border: 0.89px solid var(--button-bg-hover);}
.save-button:active {background-color: var(--button-bg-active);}

.icon-save {
    width: 20px;
    height: 20px;

    background-image: url('save.svg');
    background-size: cover;
    background-position: center;

    transition: 0.2s ease-out;
}

.dark-mode-toggle {
    width: 45px;
    height: 45px;

    background-color: var(--button-bg);
    border: 0.89px solid var(--button-border);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s ease-out;
}

.icon-button {
    width: 15px;
    height: 15px;

    background-image: var(--darkmode-icon);
    background-size: cover;
    background-position: center;
    
    transition: 0.2s ease-out;
}

.dark-mode-toggle:hover {background-color: var(--button-bg-hover); border: 0.89px solid var(--button-bg-hover);}
.dark-mode-toggle:active {background-color: var(--button-bg-active);}

@media (max-width:780px) {
    .buttons {
        width: 120px;
        height: 60px;
    }

    .save-button, .dark-mode-toggle {
        width: 60px;
        height: 60px;
    }

    .icon-button, .icon-save {
        width: 25px;
        height: 25px;
    }
}

.desktop-buttons {
    display: flex;
    width: auto;
    height: 30px;
    align-items: center;
}

@media (max-width:780px) {
    .desktop-buttons {
        display: none;
        width: 0;
    }
}

.file-button, .typefile-button, .save-as {
    width: auto;
    height: 22px;
    padding: 0 10px;
    margin-left: 10px;

    background-color: var(--button-bg);
    border: 0.89px solid var(--button-border);
    cursor: pointer;

    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: var(--text-color-btn);

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s ease-out;
}

.file-button:hover, .typefile-button:hover, .save-as:hover {background-color: var(--button-bg-hover);}
.file-button:active, .typefile-button:active, .save-as:active {background-color: var(--button-bg-active);}

.space-count {
    font-size: 14px;
    color: var(--text-color);
    margin-right: 10px;

    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
}

.space-hour {
    height: 30px;
    font-size: 14px;
    color: var(--text-color);
    margin-right: 10px;

    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    cursor: default;

    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease-out;

    padding: 0 5px;
    cursor: pointer;
}

.space-hour:hover {background-color: var(--button-bg-hover);}

.space-hour-ex {
    width: 100%;
    height: 100%;

    font-family: 'Courier New', Courier, monospace;
    font-size: 60px;
    color: var(--text-color);

    text-align: center;
    justify-content: center;
    align-items: center;

    display: none;
}

@media (max-width:780px) {
    .space-count {
        display: none;
    }

    .space-hour {
        margin-right: 0;
        width: fit-content;
        height: 60px;
        cursor: default;
    }
}

.border-box {
    display: none;
    position: absolute;
    top: 20px;

    padding: 10px;
    box-sizing: border-box;
    background-color: transparent;
}

.box {
    background-color: var(--bg-editor);
    border: 0.89px solid var(--button-border);
    box-sizing: border-box;
    z-index: 10;
    flex-direction: column;
}

.option {
    width: 100%;
    padding: 5px 10px;
    box-sizing: border-box;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--button-bg);
    border: 0.89px solid var(--button-border);
    font-size: 12px;
    color: var(--text-color-btn);
    transition: 0.2s ease-out;

    cursor: pointer;
}

.option:hover {
    background-color: var(--button-bg-hover);
}
.option:active {
    background-color: var(--button-bg-active);
}

a.typefile-button {
    position: relative;
    cursor: default;
}
a.typefile-button:hover .border-box {
    display: flex;
}
