* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f1f3f4;
    color: #202124;
    overflow: hidden;
}


/* =========================
   TOP BAR
   ========================= */

.topbar {
    height: 68px;
    background: #ffffff;
    border-bottom: 1px solid #dadce0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 13px;
}

.document-logo {
    width: 42px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-page {
    position: relative;

    width: 29px;
    height: 37px;

    background: #4f72d8;
    border-radius: 2px;

    box-shadow:
        0 1px 2px rgba(0,0,0,0.15);
}

.logo-fold {
    position: absolute;

    top: 0;
    right: 0;

    width: 12px;
    height: 12px;

    background: #87a2ed;

    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.logo-line {
    position: absolute;

    left: 6px;

    height: 2px;
    width: 16px;

    background: #ffffff;
    border-radius: 2px;
}

.line-1 {
    top: 15px;
}

.line-2 {
    top: 21px;
}

.line-3 {
    top: 27px;
    width: 12px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 17px;
    color: #5f6368;
    margin-bottom: 2px;
}

.document-title {
    width: 220px;

    border: 1px solid transparent;
    border-radius: 4px;

    padding: 3px 5px;

    font-size: 14px;
    color: #202124;
    background: transparent;

    outline: none;
}

.document-title:hover,
.document-title:focus {
    border-color: #dadce0;
    background: #fff;
}


.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-action {
    border: 0;
    background: transparent;

    padding: 8px 13px;

    font-size: 14px;
    color: #5f6368;

    border-radius: 4px;

    cursor: pointer;
}

.top-action:hover {
    background: #f1f3f4;
}

.share-button {
    background: #edf2ff;
    color: #3156bd;
}

.share-button:hover {
    background: #e0e8ff;
}

.avatar {
    width: 32px;
    height: 32px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #6d7bbd;
    color: white;

    font-size: 14px;
}


/* =========================
   MENU BAR
   ========================= */

.menu-bar {
    height: 38px;

    display: flex;
    align-items: center;

    padding: 0 14px;

    background: #ffffff;
    border-bottom: 1px solid #dadce0;
}

.menu-button {
    border: 0;
    background: transparent;

    padding: 7px 10px;

    border-radius: 4px;

    color: #3c4043;
    font-size: 13px;

    cursor: pointer;
}

.menu-button:hover {
    background: #f1f3f4;
}


/* =========================
   TOOLBAR
   ========================= */

.toolbar {
    height: 49px;

    display: flex;
    align-items: center;

    gap: 4px;

    padding: 0 12px;

    background: #ffffff;
    border-bottom: 1px solid #dadce0;
}

.tool-button {
    min-width: 32px;
    height: 32px;

    border: 0;
    border-radius: 4px;

    background: transparent;

    font-size: 15px;
    color: #444746;

    cursor: pointer;
}

.tool-button:hover {
    background: #f1f3f4;
}

.tool-button.active {
    background: #dce5ff;
}

.toolbar-select {
    height: 32px;

    border: 1px solid transparent;
    border-radius: 4px;

    background: transparent;

    padding: 0 8px;

    color: #444746;
    font-size: 13px;

    cursor: pointer;
}

.toolbar-select:hover {
    border-color: #dadce0;
}

.small-select {
    width: 76px;
}

.font-select {
    width: 130px;
}

.divider {
    width: 1px;
    height: 25px;

    background: #dadce0;

    margin: 0 6px;
}


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

.workspace {
    position: absolute;

    top: 155px;
    bottom: 31px;
    left: 0;
    right: 0;

    overflow: auto;

    padding: 35px 30px 60px;

    background: #f1f3f4;
}

.document-page {
    width: 816px;
    min-height: 1056px;

    margin: 0 auto;

    background: #ffffff;

    box-shadow:
        0 1px 3px rgba(60,64,67,0.2),
        0 2px 8px rgba(60,64,67,0.15);

    padding: 76px 82px;
}

.editor {
    min-height: 900px;

    outline: none;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;

    line-height: 1.6;

    color: #202124;

    white-space: pre-wrap;
}

.editor:empty::before {
    content: "Start typing...";
    color: #a0a4aa;
}

.editor h1 {
    font-size: 28px;
}

.editor h2 {
    font-size: 22px;
}

.editor h3 {
    font-size: 18px;
}


/* =========================
   STATUS BAR
   ========================= */

.statusbar {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    height: 31px;

    background: #ffffff;
    border-top: 1px solid #dadce0;

    display: flex;
    align-items: center;

    padding: 0 14px;

    font-size: 11px;
    color: #6b6f72;
}

.status-spacer {
    flex: 1;
}


/* =========================
   NOTIFICATION
   ========================= */

.notification {
    position: fixed;

    left: 50%;
    bottom: 55px;

    transform: translateX(-50%) translateY(15px);

    opacity: 0;

    background: #303134;
    color: #fff;

    padding: 10px 15px;

    border-radius: 5px;

    font-size: 13px;

    pointer-events: none;

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* =========================
   MENU POPUP
   ========================= */

.menu-popup {
    position: fixed;

    display: none;

    min-width: 180px;

    padding: 6px 0;

    background: #ffffff;

    border: 1px solid #dadce0;

    box-shadow:
        0 3px 10px rgba(0,0,0,0.18);

    border-radius: 5px;

    z-index: 1000;
}

.menu-popup.visible {
    display: block;
}

.popup-item {
    padding: 9px 15px;

    font-size: 13px;
    color: #3c4043;

    cursor: pointer;
}

.popup-item:hover {
    background: #f1f3f4;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 900px) {

    .top-actions {
        display: none;
    }

    .toolbar {
        overflow-x: auto;
    }

    .workspace {
        padding: 20px 10px;
    }

    .document-page {
        width: 100%;
        min-height: 900px;

        padding: 55px 45px;
    }

}

@media (max-width: 600px) {

    .brand-name {
        display: none;
    }

    .document-title {
        width: 170px;
    }

    .document-page {
        padding: 40px 25px;
    }

}
