@font-face {
    font-family: "Nunito";
    src: url("/assets/fonts/Nunito-VariableFont_wght.ttf");
}

@font-face {
    font-family: "DSEG14";
    src: url("/assets/fonts/DSEG14Classic-Regular.ttf");
}

body {
    margin: 0;
    background-color: #303030;
    overflow: hidden;
    font-family: "Nunito";

    scrollbar-gutter: stable both-edges;
    scrollbar-color: black rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

:root {
    --navbar-height: 4rem;
    --icon-size: 2rem;
}

.hidden {
    opacity: 0;
}

/* styles for Page component */
.page-base {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
}

.page-hide {
    display: none !important;
}

/* styles for Navbar component */
.navbar-base {
    width: 100vw;
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: left;
    background-color: var(--navbar-bg);
    height: var(--navbar-height);
}

.navbar-button {
    cursor: pointer;
    padding: 0.5rem;
    margin: 0.5rem;
    outline: none;
    background-color: var(--navbar-button-color);
    color: var(--navbar-button-text);
    border: none;
    font-size: 1rem;
    border-radius: 0.25rem;
}

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

.navbar-button-active {
    background-color: var(--navbar-button-color-active);
}

/* styles for Settings component */

.settings-icon {
    --settings-offset: calc((var(--navbar-height) - var(--icon-size)) / 2);
    position: absolute;
    right: var(--settings-offset);
    bottom: var(--settings-offset);
    width: var(--icon-size);
    height: var(--icon-size);
    color: var(--settings-gear-color);
    cursor: pointer;
    z-index: 1001;
}

.settings-blocker {
    position: absolute;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    user-select: none;
}

.settings-page {
    background-color: white;
    border-radius: 0.5rem;
    position: absolute;
    left: 50vw;
    top: 50vh;
    width: calc(min(80vw, 100vh));
    height: 80vh;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    padding: 1rem;
    cursor: default;
    user-select: none;
}

.settings-page > div {
    overflow-y: auto;
}

.settings-container {
    box-sizing: border-box;
    padding: 1rem;
    max-height: 90%;
}

.settings-caret {
    width: 1rem;
    height: 1rem;
    transition-duration: 0.25s;
}

.settings-caret-rotated {
    transform: rotate(90deg);
}

.settings-section-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
}

.settings-hidden {
    display: none;
}

.settings-color-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #eee;
    border-radius: 0.25rem;
    padding: 0.5rem;
    box-sizing: border-box;
    margin-block: 1rem;
}

.settings-color-reset {
    background-color: #fc3333;
    color: white;
    border-radius: 0.25rem;
    box-sizing: border-box;
    padding: 1rem;
    border: none;
    outline: none;
    margin-block: 1rem;
    font-size: 1rem;
    cursor: pointer;
}

.settings-color-reset:hover {
    background-color: #e23333;
}

.settings-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    box-sizing: border-box;
    width: 100%;
    border-radius: 0.5rem;
    background-color: #eee;
    margin-block-end: 1rem;
}

.settings-link-item div {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
}

.settings-link-thumbnail {
    width: 2rem;
    height: 2rem;
}

.settings-link-delete {
    width: 2rem;
    height: 2rem;
    justify-self: flex-end;
    border-radius: 50%;
    cursor: pointer;
}

.settings-link-edit {
    width: 1.5rem;
    height: 1.5rem;
    justify-self: flex-end;
    cursor: pointer;
}

.settings-link-input {
    border-radius: 0.5rem;
    background-color: #ddd;
    padding: 0.5rem;
    box-sizing: border-box;
    border: 2px solid #aaa;
    outline: none;
    width: 75%;
}

.settings-link-create {
    background-color: lightgreen;
    border-radius: 0.5rem;
    padding: 0.5rem;
    border: 2px solid #3a3;
    cursor: pointer;
    width: 5rem;
}
.settings-link-create:hover {
    background-color: #7d7;
}

.settings-link-blocked {
    cursor: not-allowed;
    opacity: 0.25;
}

.settings-link-name {
    text-wrap: wrap;
}

.settings-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    border-radius: 50%;
}

.settings-close:hover {
    background-color: lightgray;
}

/* links page */

.links-container {
    position: absolute;
    left: 10vw;
    top: calc(10vh - (var(--navbar-height) / 2));
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    width: 80vw;
    height: 80vh;
    align-items: center;
    justify-content: center;
}

.links-container div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 8rem;
    cursor: pointer;
    padding: 1rem;
    box-sizing: border-box;
}

.links-container div img {
    width: 2.5rem;
    height: 2.5rem;
    border: 0.5rem solid var(--links-icon-bg);
    border-radius: 1rem;
    background-color: var(--links-icon-bg);
}
.links-container div p {
    color: var(--links-text-color);
}

.links-page {
    background-color: var(--links-bg-color);
}

/* clock styling */

.clock-base {
    position: absolute;
    left: 50vw;
    top: 2rem;
    transform: translateX(-50%);
    font-family: "DSEG14";
    color: var(--links-clock-color);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    background-color: var(--links-clock-bg);
    border-radius: 1rem;
    padding: 1rem;
    user-select: none;
}

.ampm {
    font-size: 2rem;
}

.clock-display {
    font-size: 6rem;
}

.clock-on {
    color: var(--links-clock-color);
}

.clock-off {
    color: var(--links-clock-shadow);
}

/* game canvas styling */

.canvas-base {
    position: absolute;
    left: 0;
    top: 0;
    height: calc(100vh - var(--navbar-height));
    width: 100vw;
    pointer-events: none;
}

.jj-base {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1002;
    background-color: #1b1738;
}

.jj-hidden {
    display: none;
}

.note-base {
    color: var(--notes-text-color);
    position: absolute;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}

.note-header {
    background-color: rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 2rem;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding-inline: 1rem;
    box-sizing: border-box;
}

.note-icon {
    width: 1rem;
    height: 1rem;
    user-select: none;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.1);
}

.note-theme-1 {
    background-color: var(--notes-theme-1);
}

.note-theme-2 {
    background-color: var(--notes-theme-2);
}

.note-theme-3 {
    background-color: var(--notes-theme-3);
}

.note-theme-4 {
    background-color: var(--notes-theme-4);
}

.note-theme-5 {
    background-color: var(--notes-theme-5);
}

.note-theme-6 {
    background-color: var(--notes-theme-6);
}

.note-resize-icon {
    position: absolute;
    right: 1.25rem;
    bottom: 0.25rem;
    width: 1rem;
    height: 1rem;
    cursor: nwse-resize;
    user-select: none;
    transform: rotate(90deg);
    background-color: rgba(0, 0, 0, 0.1);
}

.body-display,
.body-editor {
    position: absolute;
    left: 0;
    top: 2rem;
    width: 100%;
    height: calc(100% - 2rem);
    overflow-y: auto;
    box-sizing: border-box;
    resize: none;
}

.body-editor {
    display: none;
    z-index: 10000;
}

.body-display {
    cursor: text;
    padding: 0.5rem;
    user-select: none;
}

.notes-li-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-li-checkbox-checked,
.notes-li-checkbox-unchecked {
    box-sizing: border-box;
    border-radius: 50%;
    width: 0.75rem;
    height: 0.75rem;
    min-width: 0.75rem;
    cursor: pointer;
}

.notes-li-checkbox-unchecked {
    border: 1px solid var(--notes-check-color);
}

.notes-li-checkbox-checked {
    background-color: var(--notes-check-color);
}

.notes-page {
    background-color: var(--notes-bg-color);
}

.popup-base {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: white;
    width: 100%;
    box-sizing: border-box;
}

.popup-button {
    width: 2rem;
    height: 2rem;
    cursor: pointer;
}

.notes-menu-btn {
    position: absolute;
    bottom: calc(1rem + var(--navbar-height));
    width: var(--icon-size);
    height: var(--icon-size);
    cursor: pointer;
    color: var(--notes-btn-color);
    z-index: 10000;
    user-select: none;
}

.notes-create-button {
    left: 1rem;
}

.notes-trash-button {
    left: calc(2rem + var(--icon-size));
}

.cp-base {
    width: 2rem;
    height: 2rem;

    border: 2px solid black;
    border-radius: 0.25rem;
    background-image: url(assets/images/checkerboard.png);
    cursor: pointer;
    background-size: contain;
    position: relative;
}

.cp-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
}

.cp-popup {
    background-color: white;
    border: 2px solid black;
    border-radius: 0.25rem;
    position: absolute;
    left: 50vw;
    top: 50vh;
    transform: translate(-50%, -50%);
    z-index: 100000;
    padding: 0.5rem;
    user-select: none;
    cursor: default;
}

.cp-popup-blocker {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 99999;
}

.cp-selector-base {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 20rem;
    user-select: none;
}

.cp-selector-label,
.cp-selector-input,
.cp-str-input,
.cp-selector-slider {
    padding: 0.25rem;
    box-sizing: border-box;
    user-select: none;
    position: relative;
}

.cp-selector-label {
    width: 10%;
}

.cp-selector-input {
    width: 25%;
}

.cp-selector-slider {
    width: 50%;
}

.cp-str-input {
    width: 60%;
}

.cp-hline {
    margin-block: 0.5rem;
    width: 100%;
    height: 1px;
    background-color: black;
}

.cp-submit,
.cp-cancel {
    border: none;
    outline: none;
    padding: 0.5rem;
    background-color: seagreen;
    color: white;
    cursor: pointer;
    border-radius: 0.25rem;
}

.cp-cancel {
    background-color: darkred;
}

.ct-base {
    width: 2rem;
    height: 2rem;

    border: 2px solid black;
    border-radius: 0.25rem;
    background-image: url(assets/images/checkerboard.png);
    background-size: contain;
    position: relative;
}

.ct-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
}

.ch-base {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(8, auto);
    min-height: 2rem;
    row-gap: 0.25rem;
}

.clock-inner {
    height: 7rem;
}

@media screen and (max-width: 600px) {
    .ampm {
        font-size: 1rem;
    }

    .clock-display {
        font-size: 3rem;
    }

    .clock-inner {
        height: 4rem;
    }

    .settings-page {
        width: 100vw;
        height: 100vh;
        border-radius: 0px;
    }

    .settings-container {
        padding: 0.5rem;
    }

    .settings-link-create {
        width: 4rem;
    }
}

.notes-bg-canvas {
    width: 100%;
    height: 100%;
}
