:root {
   --xs: 8px;
   --s: 16px;
   --m: 32px;
   --l: 64px;
   --xl: 128px;
   
   --height-bar: calc(2 * var(--m));
   --height-keyboard: 800px;
   --full-width: 1200px;
   --dialog-width: 800px;
   --bar-width: 600px;

   font-size: var(--s);
   color-scheme: light dark;


   /* Light mode colors (default) */
   --accent: #4a90e2;
   --accent-light: #d4e8ff;
   --secondary: #b8616f;
   --bg: #f5f5f5;
   --bg-light: #ffffff;
   --text: #2c2c2c;
   --text-light: #666666;
   --border: #e0e0e0;

   --navigation-button-bg: rgba(255,255,255,0.5);
   --navigation-button-border: rgba(255,255,255,0.8);
   --navigation-button-color: var(--text);
   --navigation-button-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

@media (prefers-color-scheme: dark) {
   :root {
      /* Dark mode colors */
      --accent: #64b5f6;
      --accent-light: #2196f3;
      --secondary: #d4848f;
      --bg: #1a1a1a;
      --bg-light: #2d2d2d;
      --text: #e0e0e0;
      --text-light: #999999;
      --border: #404040;

      --navigation-button-bg: rgba(255,255,255,0.08);
      --navigation-button-border: rgba(255,255,255,0.25);
      --navigation-button-color: var(--text);
      --navigation-button-shadow: 0 2px 10px rgba(0,0,0,0.45);
   }
}

html[data-theme="light"] {
   /* Light mode colors */
   --accent: #4a90e2;
   --accent-light: #d4e8ff;
   --secondary: #b8616f;
   --bg: #f5f5f5;
   --bg-light: #ffffff;
   --text: #2c2c2c;
   --text-light: #666666;
   --border: #e0e0e0;

   --navigation-button-bg: rgba(255,255,255,0.5);
   --navigation-button-border: rgba(255,255,255,0.8);
   --navigation-button-color: var(--text);
   --navigation-button-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

html[data-theme="dark"] {
   /* Dark mode colors */
   --accent: #64b5f6;
   --accent-light: #2196f3;
   --secondary: #d4848f;
   --bg: #1a1a1a;
   --bg-light: #2d2d2d;
   --text: #e0e0e0;
   --text-light: #999999;
   --border: #404040;

   --navigation-button-bg: rgba(255,255,255,0.08);
   --navigation-button-border: rgba(255,255,255,0.25);
   --navigation-button-color: var(--text);
   --navigation-button-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.apple-darkmode {
   --bg: #000000;
   --bg-light: #1c1c1c;
   --text: #464647;
   --text: #474748;
   --text: #59595B;
   --text: #98989A;
   --text: #98989C;
}


*, *::before, *::after { box-sizing: border-box; }

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { touch-action: manipulation; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; }
html { background-color: var(--bg); color: var(--text); }




/* UI */
.section { margin: var(--s); padding: var(--m); border-radius: var(--m); background-color: var(--bg-light); }

/* Buttons */
.button { width: 1.5em; height: 1.5em; font-size: 1.5em; background-color: rgba(255, 255, 255, 0.5); border: 0.5px solid white; border-radius: 50%; color: black; backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; cursor: pointer; }
.button:hover { transform: translate(0px, calc(0px - var(--xs) / 2)); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); }

/* Same glassy, fixed-to-viewport look as .navigation-menu-button in the app, but pill-shaped to hold text */
.floating-button {
   position: fixed;
   left: 50%;
   bottom: calc(env(safe-area-inset-bottom) + var(--m));
   transform: translateX(-50%);
   z-index: 1100;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 0.8em 2em;
   border: 1px solid var(--navigation-button-border);
   border-radius: 9999px;
   background-color: var(--navigation-button-bg);
   color: var(--navigation-button-color);
   box-shadow: var(--navigation-button-shadow);
   backdrop-filter: blur(5px);
   font-size: 1.1rem;
   font-weight: 600;
   cursor: pointer;
   transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.floating-button:hover { transform: translateX(-50%) translateY(calc(0px - var(--xs) / 2)); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); }
.floating-button[disabled] { opacity: 0.6; cursor: not-allowed; }


/* nav { position: fixed; top: 1em; left: 1em; z-index: 99; } */
.circle-button { width: 1.5em; height: 1.5em; font-size: 1.5em; background-color: rgba(255, 255, 255, 0.5); border: 0.5px solid white; border-radius: 50%; color: black; backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; }
.circle-button:hover { transform: translate(0px, calc(0px - var(--xs) / 2)); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); }

.add-button { width: 1.5em; height: 1.5em; font-size: 1.5em; background-color: var(--accent-light); border: 0.5px solid white; border-radius: 50%; color: black; backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out; }
.add-button:hover { transform: translate(0px, calc(0px - var(--xs) / 2)); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); }

.home-link { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; font-weight: 700; color: var(--text); text-decoration: none; }
.home-link img { display: inline-block; margin-right: 2ch; border-radius: 100vh; height: 2em; width: auto; transform: scale(1.5) translate(20%, 20%); }

.button-pill { padding: 0.5em 1.5em; font-size: 1.5em; background-color: var(--accent-light); border: 0.5px solid white; border-radius: 9999px; color: black; backdrop-filter: blur(5px); display: inline-flex; justify-content: center; align-items: center; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out; }

/* button { padding: 0; margin: 0; border: none; background-color: transparent; cursor: pointer; color: inherit; }
button svg { display: block; } */

input, select, textarea { background-color: var(--bg-light); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 0.5em 0.75em; }
input::placeholder, textarea::placeholder { color: var(--text-light); }
/* input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } */


/* Radio and Checkbox */
/* input[type="radio"] { display: none; }
input[type="radio"] + label { cursor: pointer; font-size: 1.2em; border: 2px solid #ddd; border-radius: 0.3rem; padding: 0.3rem; margin-right: 0.3rem; margin-bottom: 0.3rem; color: #999; }
input[type="radio"]:checked + label { color: black; border: 2px solid var(--accent-color);  }

input[type="checkbox"] { display: none; }
input[type="checkbox"] + label { cursor: pointer; padding: 0.3rem 0; border: 2px solid transparent; }
input[type="checkbox"] + label::before { content: "✓"; display: inline-flex; justify-content: center; align-items: center; width: 1.2em; height: 1.2em; margin-right: 0.3em; box-shadow: 0 0 2px rgba(0,0,0,0.1); border-radius: 50%; border: solid 0px white; color: #ccc; background-color: #ccc; }
input[type="checkbox"]:checked + label::before { color: black; } */




/* DIALOG */

.plain-dialog { position: fixed; inset: auto var(--m) var(--m) var(--m); width: 100%; max-width: var(--full-width); background-color: var(--bg-light); border: 0.5px solid white; border-radius: var(--m); color: var(--text); backdrop-filter: blur(5px); justify-content: center; align-items: center; box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.3); transform: translateY(100%); }
.plain-dialog::backdrop { background: rgba(0, 0, 0, 0); }
.plain-dialog[open] { animation: plain-dialog-in 240ms ease-out forwards; }
.plain-dialog.is-closing { animation: plain-dialog-out 200ms ease-in forwards; }
.plain-dialog[open]::backdrop { animation: plain-backdrop-in 240ms ease-out forwards; }
.plain-dialog.is-closing::backdrop { animation: plain-backdrop-out 200ms ease-in forwards; }

@keyframes plain-dialog-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes plain-dialog-out { from { transform: translateY(0); } to { transform: translateY(100%); } }
@keyframes plain-backdrop-in { from { background: rgba(0, 0, 0, 0); } to { background: rgba(0, 0, 0, 0.2); } }
@keyframes plain-backdrop-out { from { background: rgba(0, 0, 0, 0.2); } to { background: rgba(0, 0, 0, 0); } }

.rainbow-dialog { background-color: var(--bg-light); background-image: url(/static/images/background/gradient-rainbow.svg); background-repeat: no-repeat; background-size: cover; border: 0.5px solid #fff; }






.input-wrapper { margin-left: calc(1 * var(--m)); position: relative; }
.input-wrapper .search-icon { position: absolute; left: calc(0px - var(--m)); top: 50%; transform: translateY(-50%); color: var(--text-light); width: 1.5em; height: 1.5em; }
.input-wrapper > input { padding: var(--s); }
.input-wrapper > input + label { position: absolute; top: 50%; left: 2px; padding: 0 var(--s); background-color: var(--bg-light); transition: top 0.3s ease-in-out, transform 0.5s ease-in-out; color: var(--text-color); }
.input-wrapper > input + label { top: 0; transform: translate(0%, -85%); }
.input-wrapper > input:invalid + label { top: 50%; transform: translate(0%, -50%); }
.input-wrapper > input:focus + label { top: 0; transform: translate(0%, -85%); }






.in-development { border: 3px solid rebeccapurple; }
