:root {
    --color: #ffffff;
    --title-opacity: 1;
    --show-folders: none;
    --create-dial-display: block;
    --clock: none;
    --settings: none;
    --search: block;
    --columns: 100%;
    --image-scaling: contain;
    --dial-width: 220px;
    --dial-height: 142px;
    --dial-margin: 14px; /*todo: oops accidentally bumped this from 12 to 18 */
}

/* Apply a smooth transition for the background image */
.thumb {
    transition: background-image 0.5s ease-in-out, background-color 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
  }

.buttonContainer {
    display: flex;
    justify-content: space-between;
    margin: .6em 0;
}


@font-face {
    font-family: 'Noto Sans';
    src: url('../fonts/NotoSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('../fonts/NotoSans-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('../fonts/NotoSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('../fonts/NotoSans-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Sans';
    src: url('../fonts/NotoSans-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body {
    background: #222222;
    background-size: cover;
    font-family: 'Noto Sans', sans-serif;
    font-size: small;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.gradientBackground {
    background: linear-gradient(135deg, #0fd7fc 0%, #00a7d1 20%, #4a8bfc 40%, #4a8bfc 60%, #00a7d1 80%, #0fd7fc 100%);
    background-size: 200% 200%;
    animation: gradient 30s ease-in-out infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

h1 {
    font-weight: 300;
    font-size: 2.5rem;
}

.helpText {
    font-size: 1.25rem;
    font-weight: 300;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); /* Add text shadow */
}

/* total width */
#tileContainer::-webkit-scrollbar {
    background-color: rgba(0,0,0,0.2);
    width: 7px;
}

/* background of the scrollbar except button or resizer */
#tileContainer::-webkit-scrollbar-track {
    background-color: transparent;
}

/* scrollbar itself */
#tileContainer::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.4);
    border: 10px solid transparent;
}

/* set button(top and bottom of the scrollbar) */
#tileContainer::-webkit-scrollbar-button {
    display:none;
}

#tileContainer {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 150ms ease-in;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: rgba(255,255,255,0.4) rgba(0,0,0,0.2);
    scrollbar-width: thin;
}

@media (max-width: 768px) {
    #tileContainer {
        padding: 0 2px;
    }
}

@media (min-width: 769px) and (max-width: 1920px) {
    #tileContainer {
        padding: 0 10px;
    }
}

@media (min-width: 1921px) and (max-width: 2560px) {
    #tileContainer {
        padding: 0 20px;
    }
}

@media (min-width: 2561px) {
    #tileContainer {
        padding: 0 40px;
    }
}

.container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: safe center;
    justify-content: center;
    min-height: calc(100% - 78px);
    max-width: var(--columns);
    margin: auto;
    opacity: 0;
    transition: opacity 240ms;
}

#noBookmarks {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 100px 80px 100px;
    color: #ffffff;
    width: 100%;
    z-index: 0;
}

.default-content.helpText.cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    font-weight: 400;
    opacity: 0.8;
}

.default-content.helpText.cta:hover {
    opacity: 1;
    transition: opacity 160ms ease;
}

.default-content.helpText.cta svg {
    margin-right: 8px; /* Adjust the spacing as needed */
    vertical-align: middle;
}

.cta-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.hide {
    opacity: 0;
}

.folderTitle {
    opacity: 0.85;
    font-weight: bold;
    transition: padding 160ms ease, outline 160ms ease;
    margin: 12px;
}

.folderTitle:hover {
    opacity: 1;
}

.activeFolder {
    opacity: 1;
}

#deleteFolderModalName {
    font-weight: bold;
}

.tile {
    width: var(--dial-width);
    height: var(--dial-height);
    border-radius: 7px;
    margin: var(--dial-margin);
    will-change: transform;
    /*transition: width 240ms ease-in-out, height 300ms ease-in-out;*/
}

.tile:hover {

}

.tile-main {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.tile-content {
    width: 100%;
    height: var(--dial-content-height);
    border-color: transparent;
    border-radius: inherit;
    background-origin: content-box;
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: var(--image-scaling);
}

.tile-title {
    opacity: var(--title-opacity);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 10px 0 10px;
    transition: opacity 160ms ease;
}

.createDial {
    width: var(--dial-width);
    height: var(--dial-height);
    border-radius: 12px;
    margin: var(--dial-margin);
    display: var(--create-dial-display);
    z-index: 1;
}

.createDial-content {
    background-image: url('../img/createDial.svg');
    background-size: contain;
    border: 1px dotted var(--color);
    opacity: 0.6;
    transition: 160ms ease;
}

.createDial-content:hover {
    opacity: 1;
}

a {
    text-decoration: none;
    color: var(--color);
    outline: 0;
}

.selected {
    visibility: hidden;
}

.dragging {
    opacity: 1 !important;
}

.menu {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 2;
    background-color: #111111;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    box-shadow: 0 0 10px 0 rgba(0,0,0,0.2);
    transition: visibility 0s, opacity 160ms ease;
}
.menu-options {
    list-style: none;
    padding: 0;
    margin: 10px 0 10px 0;
}
.menu-separator {
    padding: 5px;
}
.menu-option {
    cursor: default;
    padding: 5px 25px;
}
.menu-option:hover {
    background-color: #333333;
}

.modal {
    transform: translateX(100%);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.6);
    transition: opacity 150ms;
}

/* Modal Content */
.modal-content {
    transform: scale(0.8);
    opacity: 0;
    background-color: #111111;
    color: #ffffff;
    border: 1px solid #000000;
    border-radius: 6px;
    padding: 5px;
    width: 420px;
    box-shadow: 0 48px 48px rgba(0, 0, 0, 0.2);
    transition: 160ms;
}

.modalImg-item {
    height: 180px;
}

#modalImgContainer {
    padding-bottom: 1em;
}

.modal [type="file"] {
    height: 0;
    overflow: hidden;
    width: 0;
}

.modal [type="file"]:focus {
    outline: none;
}

.modal .imageUploadContainer {
    padding: .4em .4em 1em .4em;
}

.modal .modalImgBtn:hover {
    transition: 200ms ease;
    color: gold;
}

.importExportForm [type="file"] {
    display: none;
}

.modal [type="file"] + label {
    border: none;
    color: #fff;
    cursor: default;
    display: inline-block;
    outline: none;
    position: relative;
    transition: all 160ms;
    vertical-align: middle;
    width: 100%;
    padding: 0.6em;
    text-align: center;
}

.modal [type="file"] + label:hover {
    background-color: #FF3A4FFF;
}

#statusMessage {
    color: yellow;
    font-weight: bold;
}

.closeBtn {
    color: #ccc;
    float: right;
    font-size: large;
}

.closeBtn:hover,
.closeBtn:focus {
    color: #fff;
    text-decoration: none;
}

.button {
    border: none;
    color: #fff;
    cursor: default;
    display: inline-block;
    outline: none;
    position: relative;
    transition: all 160ms;
    vertical-align: middle;
    width: 100%;
    padding: 0.6em;
    text-align: center;
    border-radius: 6px;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.tileForm {
    padding: .6em;
}

.formItem {
    width: 100%;
    padding: .4em;
}

.formItem > input,
.formItem > textarea,
.formItem > button {
    padding: .6em;
    width: 100%;
    border-radius: 6px;
}

.formItem > button {
    color: #ffffff;
    border: none;
}

.formItem > label {

}

.formItem > .action {
    position: relative; /* Ensure the pseudo-element is positioned correctly */
    background-color: #111111;
}

.formItem > .actionSecondary {
    background-color: #111111;
}

#modalBgColorPickerInput {
    opacity: 0;
    position: fixed;
    width: 0;
    height: 0;
    border: none;
}

.formItem > .action::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    border-bottom: 2px solid #1692EA;
    transform: scaleX(0);
    transition: transform 200ms;
    transform-origin: 50% 50%;
}

.formItem > button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: none;
}

.formItem > button svg {
    margin-right: 5px;
    vertical-align: middle;
}

.formItem > .save {
    /* background-color: #13ac4e; */
    background-color: #1681d9;
}

.formItem > .delete {
    background-color: #dc3545;
}

.formItem > .close {
    background-color: #333;
}

.formItem > .save:hover {
    background-color: #1692EA;
}


.formItem > .action:hover::after {
    transform: scaleX(1);
}

.formItem > .close:hover {
    background-color: #444444
}

input {
    border: 1px solid #333;
    outline: none;
    background-color: #333;
    color: #f2f2f2;
    font-size: medium;
}

input:focus + .inputBorder, .expand:focus .inputBorder {
    transform: scaleX(1);
  }

.inputBorder {
    border-top: 1px solid #1692EA;
    margin: 0 2px 0 2px;
    transform: scaleX(0);
    transition: transform 200ms;
    transform-origin:  50% 50%;
}

.inputCloseBtn {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
    cursor: default;
}

.inputCloseBtn:hover {
    color: #ccc;
}

#imageUrlContainer {
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
}

#fetchImageButton {
    flex: 0 0 26px; /* Make the button 25% of the container's width */
}

#fetchImageButton svg {
    fill: rgb(0, 255, 170);
    opacity: 0.8;
    transition: all 0.3s ease;
}

#fetchImageButton:hover svg {
    opacity: 1;
    transition: all 0.3s ease;
}


/* overrides */
.fc-slide {
    padding: 0;
}

.fc-slide img {
    max-height: 180px;
    max-width: 100%;
}

.fc-image img, .fc-image picture {
    max-height: 180px;
    max-width: 100%;
}

.fc-arrows .fc-next.fc-is-active .fc-icon, .fc-arrows .fc-prev.fc-is-active .fc-icon {
    background-color: rgba(17, 17, 17, 0.9);
    color: #ccc;
}

.fc-arrows .fc-prev.fc-is-active:hover .fc-icon, .fc-arrows .fc-next.fc-is-active:hover .fc-icon {
    color: #fff;
}

.fc.fc-circles.fc-circles-overlay .fc-circles {
    position: unset !important;
}

.sidenav {
    height: 100%; /* 100% Full-height */
    width: 320px; /* 0 width - change this with JavaScript */
    position: fixed; /* Stay in place */
    transform: translateX(100%);
    z-index: 3; /* Stay on top */
    top: 0; /* Stay at the top */
    right: 0;
    background: rgba(0,0,0,1);
    box-shadow: none;
    overflow-x: hidden; /* Disable horizontal scroll */
    transition: 360ms; /* 0.5 second transition effect to slide in the sidenav */
    color: white;
    display: none;
    justify-content: center;
}

#foldersContainer {
    padding: 20px 30px; /*todo: nuke this when no folders are present so visually the dials appear centered */
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 20px;
}

.folders-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

#folders {
    display: contents;
}

#addFolderIcon {
    height: 1.2rem;
    opacity: 0.7;
    transition: 360ms ease;
    fill: var(--color);
    vertical-align: middle;
}

#addFolderButton {
    display: var(--show-folders);
    line-height: 1;
    margin: 12px;
}

#addFolderButton:hover {
    opacity: 1;
}

#addFolderButton:hover #addFolderIcon {
    opacity: 1;
}

/* Header controls container */
.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    /* Match the exact height and spacing of folder items */
    margin: 0 12px; /* Same margin as .folderTitle */
    font-weight: bold; /* Same font-weight as .folderTitle */
    line-height: normal; /* Ensure consistent line height */
    height: 42px;
    justify-self: end;
}

.header-controls > * {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

#settingsBtn {
    display: var(--settings);
    line-height: 1;
}

.right-align {
    float: right;
}

.settingsIcon svg {
    height: 24px;
    width: 24px;
    fill: var(--color);
    filter: opacity(0.7);
    transition: opacity 160ms ease;
    display: block;
}

.settingsIcon svg:hover {
    filter: opacity(1);
}

.searchIcon {
    display: var(--search);
    line-height: 1;
}

.searchIcon svg {
    height: 24px;
    width: 24px;
    fill: var(--color);
    filter: opacity(0.7);
    display: block;
}

.searchIcon svg:hover {
    filter: opacity(1);
}

/* Hide the floating search icon when search is active */
.search-active .searchIcon {
    opacity: 0;
    pointer-events: none;
}

/* Hide folders when search is active */
.search-active #foldersContainer {
    opacity: 0;
    pointer-events: none;
}

/* Expandable search container */
.expandable-search {
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    /* right: var(--search-position); */
    height: 40px;
    z-index: 2;
    
    display: flex;
    align-items: center;
    
    background-color: transparent;
    
    /* Initially hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.expandable-search.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    background-color: color-mix(in srgb, var(--color) 10%, transparent);
    border-radius: 8px;
    padding: 8px 20px;
    backdrop-filter: blur(18px);
}

.search-icon-container {
    display: flex;
    align-items: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-icon-expanded {
    height: 22px;
    width: 22px;
    fill: var(--color);
    opacity: 0.8;
}

#searchInput {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--color);
    font-size: 16px;
    outline: none;
    padding: 0;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.searchCloseBtn {
    margin-left: 15px;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}

.searchCloseBtn:hover {
    color: var(--color);
}

#clock {
    display: var(--clock);
    color: var(--color);
    opacity: 0.85;
    font-size: x-large;
    font-weight: 200;
    transition: 160ms ease;
    white-space: nowrap;
    line-height: 1;
    align-self: center;

    font-weight: 200;
    transition: 160ms ease;
}

#toast {
    position: fixed;
    right: 0;
    bottom: 30px;
    max-width: 50%;
    padding: 20px;
    text-overflow: ellipsis;
    line-height: 2;
    background-color: black;
    color: white;
    opacity: 0.8;
    transform: translateX(100%);
    transition: 200ms ease;
    z-index: 2;
}

#toast svg {
    vertical-align: middle;
}

#toast svg path, svg rect{
    fill: rgba(255,255,255,0.5)
}

#toastContent {
    vertical-align: middle;
    padding-left: 10px;
}

