
div.note {

    /* unselectable */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Chrome/Safari/Opera */
    cursor: default;
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera, and Firefox */

    /* Center text */
    /* text-align: center; */

    border-radius: 10px;
    background-color: #f8fafc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

    /* realistic card-looking border */
    border: 1px solid rgba(0, 0, 0, 0.327);
    overflow: hidden;
}

div.note .note-image {
    width: 100%;
    height: 52%;
    
    /* background image set by js, but set it to fit */
    background-size: cover;
    background-position: center;

    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

div.note .note-title {
    font-family: 'Jersey 10', sans-serif;
    margin: 0;
    margin-top: -14%;
    font-size: 24px;

    padding-left: 10px;
    overflow: hidden;
    white-space: nowrap;

}

div.note .note-title .scrolling-text {
    display: inline-block;
    /* The animation won’t have an effect if there’s no overflow */
    animation: none;
}
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(0);
    }
    80% {
        transform: translateX(calc(-1 * var(--scroll-distance)));
    }
    100% {
        transform: translateX(calc(-1 * var(--scroll-distance)));
    }
}

div.note .note-desc {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    margin: 0;
    margin-top: -5px;
    padding-left: 10px;
    padding-right: 10px;
    color: #343a40;

    /* Allow text to wrap to new line, but do not allow text to overflow vertically */
    overflow: hidden;
    text-overflow: ellipsis;
}

div.note .note-dollar-range {
    font-family: 'jersey 10', sans-serif;
    font-size: 20px;
    color: #fff;
    position: absolute;
    padding-left: 10px;
    top: 0;
    
    /* outline or shadow */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

div.note-container.selected div.note {
    /* Make the note larger when selected */
    transform: scale(1.05);
    /* box-shadow: 0 0 4px 4px rgba(255, 229, 100, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.5); */
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
    background-color: gold;
    border-color: #000;
    color: #000;
}

div.note-container.selected div.note::before {
    content: "✅";
    position: absolute;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: right;
    font-size: 24px;
    color: #000;
    border-radius: 10px;
}

div.note-container:hover {
    opacity: 1.0 !important
}

body {
    background-color: #f8f9fa;
    color: #343a40;
    margin: 0;
    padding: 0;

    overflow: hidden; /* Prevent scrolling */
}

/* EXPERIMENT */
.note-container {
  position: relative;
  perspective: 35rem;
  transition: scale 0.1s;
}
.note-container:has(.grid :hover) {
  scale: 1.05;
}

.note {
  position: relative;
  box-shadow: 0 0 0 0.2vmin black, -2vmin 4vmin 1vmin 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  transform: rotate3d(var(--x), var(--y), 0, var(--r));
}

.note:has(+ .grid i:is(:nth-child(1), :nth-child(2), :nth-child(5), :nth-child(6)):hover) {
  --x: -2;
  --y: 2;
  --angle: 115deg;
}
.note:has(+ .grid i:is(:nth-child(3), :nth-child(4), :nth-child(7), :nth-child(8)):hover) {
  --x: -2;
  --y: -2;
  --angle: 125deg;
}
.note:has(+ .grid i:is(:nth-child(9), :nth-child(10), :nth-child(13), :nth-child(14)):hover) {
  --x: 2;
  --y: 2;
  --angle: 135deg;
}
.note:has(+ .grid i:is(:nth-child(11), :nth-child(12), :nth-child(15), :nth-child(16)):hover) {
  --x: 2;
  --y: -2;
  --angle: 145deg;
}
.note:has(+ .grid i:is(:nth-child(1), :nth-child(4), :nth-child(13), :nth-child(16)):hover) {
  --r: 16deg;
}
.note:has(+ .grid i:is(:nth-child(2), :nth-child(3), :nth-child(5), :nth-child(8), :nth-child(9), :nth-child(12), :nth-child(14), :nth-child(15)):hover) {
  --r: 8deg;
}
.note:has(+ .grid i:is(:nth-child(6), :nth-child(7), :nth-child(10), :nth-child(11)):hover) {
  --r: 4deg;
}
.note:has(+ .grid :hover) {
  --s-o: 0.5;
  --s-s: 100%;
}
.note s {
  position: absolute;
  inset: 0;
  opacity: var(--s-o, 0);
  pointer-events: none;
  transition: --angle 0.2s, opacity 0.6s, background-size 0.3s;
  background-size: var(--s-s, 400%);
  background-image: linear-gradient(var(--angle), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.25) 15%, rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.25) 30%, rgba(255, 255, 255, 0.75) 100%), linear-gradient(calc(var(--angle) - 180deg), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1) 15%, rgba(255, 255, 255, 0.8) 20%, rgba(255, 255, 255, 0.8) 25%, rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0.3) 100%), linear-gradient(var(--angle), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15) 30%, rgba(255, 255, 255, 0.75) 33%, rgba(255, 255, 255, 0.75) 33%, rgba(255, 255, 255, 0.15) 35%, rgba(255, 255, 255, 0.25) 100%);
  border-radius: 10px;
}

.grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
}

@property --angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 135deg;
}

/* Minimalistic search box styles with an icon */
.search-box-container {
    position: absolute;
    top: 10px;
    margin-top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: transparent;
    border: none;
    /* border-radius: 20px; */
    font-family: 'Jersey 10', sans-serif;
}

.search-box-container .search-icon {
    font-size: 28px;
    margin-right: 8px;
    color: #343a40;
}

.search-box-container input {
    width: 100%;
    padding: 5px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 32px;
    color: #343a40;
    border-bottom: 1px solid #343a40;
    border-radius: 0;
}

.search-box-container input:focus {
    background: transparent;
    box-shadow: none;
}

/* Add squish animation for the 3D emoji gif */
@keyframes squish {
  0% { transform: scale(1); }
  40% { transform: scale(0.8, 1.2); }
  80% { transform: scale(1.1, 0.9); }
  100% { transform: scale(1); }
}
.squish {
  animation: squish 0.5s ease;
}

/* Control container: center bottom of the screen */
.control-container {
    position: absolute;
    bottom: 0;
    margin-bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Jersey 10', sans-serif;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #343a40;
    z-index: 1000;
}

.glassmorphism {
    backdrop-filter: blur(10px) brightness(0.9);
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

.control-container .btn {
    background: none;
    /* border: none; */
    border: none;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
}

.control-container .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.control-container .btn-icon {
    /* max-width: 50px;
    max-height: 50px; */
    text-decoration: underline
}

.control-container button.btn-success {
    background-color: #28a745;
    color: #fff;
    padding: 6px 22px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.control-container button.btn-success.disabled {
    background-color: rgba(40, 167, 70, 0.436);
    color: #fff;
    box-shadow: none;
}

.control-container button.btn-success:hover:not(.disabled) {
    background-color: #3dc35c;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5), 0 0 20px rgba(40, 167, 69, 0.3);
}