/* Windows 11 Calculator with Dark Mode, Slide-in Menu and Click to Copy - HTML, CSS & JavaScript
Follow me on;
Twitter: https://twitter.com/ericaimhigh
Instagram: https://instagram.com/@ericaimhigh_
Threads: https://threads.net/@ericaimhigh_
*/



@import url("https://site-assets.fontawesome.com/releases/v6.4.2/css/all.css");
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    align-items: center;
    font-family: poppins;
}

body {
    display: flex;
    --color: #000;
    --bg-color: #f8f8f8;
    --btn-bg: #f8f8f8;
    --white: #fff;
    --gray: #383838;
    --off: #949494;
    --hover-color: #e6e6e6;
    --close: #fff;
    --red: #f22;
    --blue: #004ec2;
    --border-color: #d4d4d4;
    --task-bg: #d4d4d4b7;
    --task-hover: #ffffff62;
    --blur-bg: #ffffffa6;
    color: var(--color);
    --wallpaper: url('files/wallpaper/wallpaper.webp');
    background: var(--wallpaper);
    max-width: 100vw;
    overflow: hidden;
    max-height: 100vh;
}


body.dark {
    --color: #fff;
    --bg-color: #323232;
    --btn-bg: #3d3d3d;
    --white: #3b3b3b;
    --gray: #cfcfcf;
    --close: #dfdfdf;
    --hover-color: #494949;
    --red: #f22;
    --blue: #ffffff;
    --border-color: #2e2e2e;
    --blur-bg: #2e2e2ea6;
    --task-bg: #2e2e2e7e;
    --task-hover: #2f549986;
    --wallpaper: url('files/wallpaper/wallpaper-dark.webp');
    color: var(--color);
}


/* Bring Items to Top */

.parent:active {
    z-index: 105;
}

.selected {
    z-index: 99;
}

.onTop {
    z-index: 100;
}


/* Theme and FullScreen Switch Buttons */
.theme,
.fullscreen {
    cursor: pointer;
    margin-left: 15px;
}









/* TaskBar */
.taskbar {
    align-items: center;
    display: flex;
    justify-content: space-evenly;
    position: fixed;
    height: 40px;
    width: 100vw;
    background: var(--task-bg);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    bottom: 0;
    padding: 20px 10px;
    z-index: 1000;
}

.task-container.start,
.task-container.end {
    width: 20%;
    display: flex;
    justify-content: space-evenly;
    color: var(--color);
}

.task-container.start {
    justify-content: flex-start;
}

.task-container.center {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    width: 60%;
    overflow: hidden;
}


img.task-icon {
    height: 35px;
    padding: 5px;
    border-radius: 8px;
    margin: 0 5px;
    transition: all 0.3s ease;
}

img.task-icon:hover {
    background: var(--task-hover);
}


.date-time {
    display: flex;
    flex-direction: column;
    align-items: end;
    font-size: 0.75rem;
    font-weight: 400;
}


.fa-bluetooth {
    color: var(--blue);
}



/* Desktop & Icons */
.desktop {
    max-height: calc(100vh - 40px);
    padding: 10px;
    z-index: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    /* column-gap: 50px; */
    /* row-gap: 10px; */
}

.desktop .icon {
    display: flex;
    flex-direction: column;
    width: 80px;
    padding: 10px 5px;
    border-radius: 5px;
    align-content: center;
    margin-top: 5px;
}

.desktop .icon:hover {
    background: var(--task-hover);
}

.desktop .icon img {
    margin: 0 auto;
    width: 45px;
}

.desktop .icon .icon-name {
    font-size: 0.7rem;
    text-align: center;
    font-weight: 400;
    color: #fff;
}

/* All Parent Divs */
.parent {
    position: absolute;
    border: 1px solid black;
    border-radius: 8px;
    background: var(--bg-color);
    overflow: hidden;
}

.parent.fullscreen {
    width: 100vw;
    height: calc(100vh - 40px);
    border-radius: 0;
    top: 0 !important;
    left: 0 !important;
    margin: 0 auto !important;
}

/* Minimise to TaskBar */
.parent.default,
.parent.hide {
    position: absolute;
    height: 0;
    width: 0;
    float: right;
    visibility: hidden;
    opacity: 0;
    margin: 0 auto;
    margin-top: 100vh;
    top: 100vh;
    left: 50vw !important;
    transition: all 0.5s ease-in;
}


.start-menu {
    position: absolute;
    margin: 0px auto;
    height: 650px;
    width: 45vw;
    bottom: 60px;
    left: calc((100vw - 45vw) / 2);
    transition: all .3s ease;
    border-radius: 12px;
    background: var(--blur-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid #69696975;
    overflow: hidden;
    z-index: 5000;
}

.start-menu .start-top {
    padding: 35px 40px;
}

.searchbar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    background: var(--bg-color);
    padding: 0 5px;
    border-radius: 5px;
    color: white;
    border-bottom: 3px solid var(--blue);
    align-items: center;
}

.searchbar i {
    padding: 10px 10px;
    color: var(--color);
}

.searchbar input[type=text] {
    outline: none;
    text-align: start;
    box-sizing: border-box;
}

.start-search::placeholder {
    color: var(--color);
}


.section-title {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.section-title .fa-2xs {
    margin: 5px;
}

.section-title .all {
    display: flex;
    padding: 2px 10px;
    background: var(--hover-color);
    border-radius: 5px;
    color: var(--color);
    justify-content: center;
    -webkit-box-shadow: 0 0 10px -2px var(--task-hover);
    -moz-box-shadow: 0 0 10px -2px var(--task-hover);
    box-shadow: 0 0 10px -2px var(--task-hover);
}

.pinned-icons {
    margin-top: 20px;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 10px;
}


.pinned-icons .icon {
    display: flex;
    padding: 5px;
    border-radius: 5px;
    flex-direction: column;
    width: 75px;
    height: 75px;
    justify-content: start;
}

.pinned-icons .icon:hover {
    background: var(--task-hover);
}

.pinned-icons .icon img {
    height: 30px;
}

.pinned-icons .icon p {
    margin-top: 5px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--color);
}

.start-menu .recommended {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

.start-menu .recommended .rec {
    display: flex;
    align-items: center;
    width: calc((100% - 10px) /2);
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

.start-menu .recommended .rec:hover {
    background: var(--task-hover);
}

.start-menu .recommended img {
    width: 40px;
}

.start-menu .recommended .name {
    width: calc(100% - 45px);
    overflow: hidden;
    margin-left: 5px;

}

.start-menu .recommended .name .filename {
    font-size: 0.85rem;
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.start-menu .recommended .name .openDate {
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.start-menu .start-bottom {
    position: absolute;
    display: flex;
    height: 60px;
    justify-content: space-between;
    width: 100%;
    padding: 15px 40px;
    bottom: 0;
    background: var(--task-bg);
}

.start-menu .start-bottom .user {
    width: 50%;
    display: flex;
    font-size: 0.85rem;
    /* align-items: center; */
}

.start-menu .start-bottom .user img {
    width: 35px;
    border-radius: 50%;
    border: 1px solid var(--color);
    margin-right: 10px;
}

.start-menu .start-bottom .action {
    display: flex;
    width: 50%;
    justify-content: flex-end;
}

.start-menu .start-bottom .action i {
    padding: 8px;
    margin: 3px;
    border-radius: 5px;
    transition: 0.3s ease;
}

.start-menu .start-bottom .action i:hover {
    background: var(--task-hover);
}



/* Calculator */
.calculator {
    height: 500px;
    width: 320px;
    top: calc(((100vh - 40px) - 500px)/ 2);
    left: calc((100vw - 320px)/ 2);
}



.menu {
    opacity: 0;
    width: 0px;
    height: 470px;
    padding: 10px 0 10px 5px;
    background: var(--white);
    position: absolute;
    margin-top: 28px;
    border: 1px solid var(--border-color);
    border-radius: 0 12px 12px 12px;
    transition: all 0.3s ease;
    visibility: hidden;
    z-index: 5;
}


.menu.active {
    margin-left: 0px;
    opacity: 1;
    width: 255px;
    visibility: visible;

}




.menu i.fa-bars {
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.8 ease-in-out;
}

.menu i.fa-bars:hover {
    background: var(--hover-color);
    cursor: pointer;
}

h5 {
    color: var(--gray);
    font-weight: 600;
    margin: 12px 0 0 10px;
}

.menu ul::-webkit-scrollbar {
    display: none;
}


.menu ul {
    height: 380px;
    overflow-y: scroll;
    scrollbar-width: none;
}

.menu ul li {
    display: flex;
    align-items: center;
    height: 36px;
    list-style: none;
    border-radius: 5px 0 0 5px;
    margin: 3px 0;
    transition: all 0.2s ease;
}

.menu ul li.active {
    background: var(--hover-color);
}

.menu ul li:hover {
    background: var(--hover-color);
}

.settings a,
.menu ul a {
    text-decoration: none;
}

.menu ul li .indicator {
    content: '';
    background: var(--blue);
    height: 15px;
    width: 3px;
    border-radius: 50px;
}

.settings li i,
.menu ul li i {
    color: var(--color);
    font-size: 0.9rem;
    margin-left: 10px;
    padding: 5px;
}

.menu-name {
    font-size: 0.9rem;
    margin-left: 10px;
    color: var(--color);
    white-space: nowrap;
}


.settings {
    display: flex;
    height: 50px;
    background: var(--white);
    position: absolute;
    width: 100%;
    bottom: 0;
    left: 0;
    border-radius: 0 0 12px 12px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.settings li {
    list-style: none;
    margin-left: 8px;

}


.settings li .menu-name {
    margin-left: 2px;
}





.history {
    opacity: 0;
    overflow: hidden;
    width: 318px;
    height: 0px;
    padding: 10px;
    background: var(--white);
    position: absolute;
    bottom: 0;
    margin-top: 121px;
    margin-bottom: calc((100vh - 498px)/ 2);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    transition: all 0.3s ease;
    visibility: hidden;
}


.history.active {
    height: 300px;
    opacity: 1;
    visibility: visible;
}

.history-w::-webkit-scrollbar {
    display: none;
}

.history-w {
    height: 240px;
    overflow-y: scroll;
    scrollbar-width: none;
}


.history-list {
    display: flex;
    align-items: center;
    height: 48px;
    margin-top: 5px;
    border-radius: 5px;
    transition: all 0.1s ease-in;
}

.history-list:hover {
    background: var(--hover-color);
}

.history-item {
    font-size: 1.35rem;
    font-weight: 600;
}

.delete {
    display: flex;
    height: 40px;
    justify-content: space-between;
    position: absolute;
    margin-bottom: 5px;
    bottom: 0;
    width: 298px;

}

.fa-trash-can {
    color: var(--color);
    font-size: 1rem;
    padding: 9px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.fa-trash-can:hover {
    background: var(--hover-color);
}

.fa-close.historyBtn {
    padding: 10px;
}

.fa-close.historyBtn:hover {
    color: var(--gray);
}



.fa-duotone {
    color: var(--blue);
}


.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 10px;
    margin-bottom: 8px;
}

.title-bar:active {
    cursor: move;
}


.left .title {
    margin-left: 10px;
    font-size: 0.9rem;
}

.title-icon {
    width: 15px;
}

.right {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.right button {
    color: var(--color);
    background: var(--bg-color);
    padding: 5px;
    top: 0;
    margin: 0;
    height: 35px;
    width: 45px;
    border: 0px;
}

.right .hide:hover,
.right .resize:hover {
    background: var(--hover-color);
}

.right .close:hover {
    background: var(--red);
    color: var(--close);
    border: 0px;
}

.options {
    display: flex;
    justify-content: space-between;
    height: 30px;
    padding: 0 10px;
    margin-bottom: 4px;
}

.options .a i.fa-bars {
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.8 ease-in-out;
}

.options .a i.fa-bars:hover {
    background: var(--hover-color);
}

.options i.fa-arrow-to-top {
    margin-left: 15px;
    cursor: pointer;
}

.b {
    cursor: pointer;
}


input {
    width: calc(100% - 20px);
    margin: 0 10px;
    text-align: right;
    border: 0px;
    background: #ffffff00;
    color: var(--color);
}

input.display {
    height: 45px;
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 2.8rem;
    font-weight: 600;
}

.memory {
    display: flex;
    justify-content: center;
    padding: 0 8px;
    margin-bottom: 2px;
}


.memory .mry {
    width: 55%;
    height: 30px;
    padding: 5px 15px;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    background: none;
    /* transition: all 0.2s ease; */
    color: var(--color);
    margin: 0;
}


.memory .mry:hover {
    background: var(--hover-color);
}

input[type='button'][disabled] {
    background: none;
    color: var(--off);
}



.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 0 5px;
    gap: 0;
}


.btn {
    display: flex;
    height: 46px;
    margin: 0;
    width: 24%;
    margin-top: 3px;
    background: var(--btn-bg);
    border: 1px solid var(--border-color);
    justify-content: space-around;
    border-radius: 5px;
    color: var(--color);
}


.btn:hover {
    background: var(--hover-color);
}

.btn.num {
    font-size: 1.12rem;
    background: var(--hover-color);
}

.btn.num:hover {
    background: var(--btn-bg);
}

.eq {
    background: var(--blue);
    color: var(--white);
}

.eq:hover {
    background: var(--blue);
    color: var(--white);
}

.mry:active,
.btn:active {
    opacity: 0.5;
}




/* App: MS Word */
.word {
    height: 500px;
    width: 80vw;
    top: calc(((100vh - 40px) - 500px)/ 2);
    left: calc((100vw - 80vw)/ 2);
}

.word-page,
.word-editor {
    height: calc(100% - 20px);
    width: 100%;
    padding: 10px;
    background: var(--bg-color);
    color: var(--color);
}


/* App: VS Code */
.vscode {
    height: 500px;
    width: 80vw;
    top: calc(((100vh - 40px) - 500px)/ 2);
    left: calc((100vw - 80vw)/ 2);
}

.vs-page {
    height: calc(100% - 20px);
    width: 100%;
    padding: 10px;
    background: var(--bg-color);
    color: var(--color);
}

/* App; Chrome */
.chrome {
    height: 500px;
    width: 80vw;
    top: calc(((100vh - 40px) - 500px)/ 2);
    left: calc((100vw - 80vw)/ 2);
}

.word-page,
.word-editor {
    height: calc(100% - 20px);
    width: 100%;
    padding: 10px;
    background: var(--bg-color);
    color: var(--color);
}