/* public/styles/usersettings.css */
/* Styles for the user settings page (usersettings.ejs) */
/* Covers the page background, header, settings card, form inputs,
   theme toggle, and save/cancel buttons */

/* Tiled pattern background using a pseudo-element so opacity can be set independently */
body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url("https://www.pngkey.com/png/full/48-483820_background-png-patterns-transparent-pattern-background-png.png");
  background-size: 300px auto;
  background-repeat: repeat;
  opacity: var(--opacity, 0.5);
  background-color: var(--theme);
  transition: all 200ms ease-in-out;
}

/* Page header with blue gradient */
header {
  text-align: center;
  background: linear-gradient(350deg, #0050c7, #0077ff);
  font-weight: bolder;
  font-size: xx-large;
  letter-spacing: 1.5px;
  padding: 15px 0;
  width: 100%;
  border-radius: 0 0 15px 15px;
  display: flex;
  align-items: center;
}

header h2 {
  text-align: center;
  width: 100%;
  color: var(--theme-text);
  filter: invert(1);
}

/* Back button that links to the main map page */
a.home-page-btn {
  display: inline-block;
  filter: invert(1);
  transform: scale(-1, 1); /* Mirror the arrow icon to point left */
  position: absolute;
  z-index: 9999;
  margin-left: 15px;
}

a.home-page-btn img {
  width: 40px;
  transition: all 200ms ease-in-out;
  filter: var(--theme-filter);
}

a.home-page-btn img:hover {
  transform: scale(1.1);
}

/* Centered main content area */
main.container {
  display: flex;
  justify-content: center;
  width: 100vw;
  max-width: unset;
}

/* Settings card */
div.wrapper {
  box-shadow: gray 0 4px 20px;
  border-radius: 15px;
  margin-top: 40pt;
  padding: 25px 50px;
  background: var(--theme);
  display: grid;
  grid-gap: 10px;
}

div.wrapper label {
  display: grid;
}

div.wrapper label.flex-item {
  margin: 10px 0 5px 0;
  display: flex;
  align-items: center;
}

/* Custom v-input styles inside the settings card */
div.wrapper v-input .input {
  box-shadow: gray 0 0px 5px;
  padding: 10px;
  border-radius: 5px;
  background: var(--theme-light);
  margin-top: 7px;
  width: 100%;
  transition: all 200ms ease-in-out;
  color: var(--theme-text);
}

div.wrapper v-input .input:hover {
  box-shadow: cadetblue 0 0px 10px;
}

div.wrapper label span {
  font-weight: 500;
  font-size: large;
  color: var(--theme-text-dark);
}

div.wrapper label.flex-item span {
  margin-left: 10px;
}

/* Theme toggle switch with blue gradient */
i-switch {
  background: linear-gradient(350deg, #00b7ff, #0077ff);
  box-shadow: gray 0 5px 15px -5px;
}

/* Light/dark mode icon next to the toggle */
img.mode-ctrl {
  height: 35px;
  padding-left: 10px;
  filter: var(--theme-filter);
}

/* Footer row containing save and cancel buttons */
.footer-nav {
  margin-top: 3%;
  display: flex;
  justify-content: center;
}

.footer-nav .ctrl-btn {
  background: linear-gradient(45deg, #00b7ff, #0077ff);
  color: #fff;
  font-weight: bold;
  font-size: large;
  letter-spacing: 1.5px;
  padding: 10px 25px;
  border-radius: 10px;
  margin: 0 12px;
  transition: all 300ms ease-in-out;
  cursor: pointer;
}

/* Disabled state for the save button when there are no unsaved changes */
.footer-nav .ctrl-btn[disabled] {
  filter: grayscale(1);
  border: dotted 3px gray;
  background: transparent;
  color: gray;
  cursor: not-allowed;
}

.footer-nav .ctrl-btn:not([disabled]):hover {
  letter-spacing: 2px;
  transform: scale(1.1);
  box-shadow: gray 0 0 10px;
}

/* Temporary */
.coming-soon {
  width: 125px;
  position: absolute;
  color: var(--theme-text);
  padding: 15px 10px;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  text-shadow: 0 0 5px var(--theme);
  transform: translate(-15px, -5px);
  font-weight: 500;
  background: none;
}
