/* CSS Reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

ol, ul {
	list-style: none;
}
/* End CSS Reset */

html {
  --fade-in-ms: 250ms;
  --slide-transition-ms: 500ms;
  --min-screen-width: 360px;
  --max-screen-width: 1080px;
  --session-screen-width: var(--max-screen-width);
  --max-player-mix-cover-width: calc(var(--screenScalingFactor) * 5000px);
  --session-player-mix-cover-width: var(--max-player-mix-cover-width);
  --release-notes-container-height: calc(var(--screenScalingFactor) * 100px); /* Default height */
  --screenScalingFactor: 0; /* Will be calculated in JavaScript */
}

html {
  font-family: "Inter", sans-serif; /* Set at root */
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--primary-color);
  color: var(--text-color);
  overscroll-behavior: contain;
  cursor: default;
  font-weight: 300;
  line-height: 1.25;
}

h1, h2, h3, h4, h5, h6,
strong, b,
button, input, select, textarea {
  font-weight: inherit;
  line-height: inherit;
}

h1 {
  font-size: calc(var(--screenScalingFactor) * 72px);
  color: var(--text-color);
}

h2 {
  font-size: calc(var(--screenScalingFactor) * 60px);
  color: var(--text-color);
}

h3 {
  font-size: calc(var(--screenScalingFactor) * 48px);
  color: var(--text-color);
}

h4 {
  font-size: calc(var(--screenScalingFactor) * 42px);
  color: var(--text-color);
}

p {
  font-size: calc(var(--screenScalingFactor) * 32px);
}

ul {
  list-style-type: disc;
  padding-left: calc(var(--screenScalingFactor) * 10px); /* Standard bullet indent */
  margin: 0;
}

li {
  font-size: calc(var(--screenScalingFactor) * 30px);
  margin-bottom: calc(var(--screenScalingFactor) * 10px); /* Space between list items */
}

li::marker {
  color: var(--bullet-item-color);
}

a {
  /* Basic styling for links */
  font-size: calc(var(--screenScalingFactor) * 40px);
}

.header-nav-button {
  height: calc(var(--screenScalingFactor) * 40px);
  width: calc(var(--screenScalingFactor) * 40px);
  background-size: contain;
  background-color: transparent;
  position: relative;
  border: none;
}

.header-nav-button::before { /* To increase the clickable size area */
  content: '';
  position: absolute;
  top: calc(var(--screenScalingFactor) * -37px);
  left: calc(var(--screenScalingFactor) * -37px);
  right: calc(var(--screenScalingFactor) * -37px);
  bottom: calc(var(--screenScalingFactor) * -37px);
  border-radius: 50%; /* Makes it a circle */
  /* border: 3px dashed #ff00ff; */
}

.item-marker-style { /* Used to size item markers for listed items */
  height: calc(var(--screenScalingFactor) * 60px);
  width: auto;
  object-fit: contain;
}

.item-text-style1 { /* Used to size text for listed items */
  font-size: calc(var(--screenScalingFactor) * 36px);
  color: var(--text-item-title-color);
}
.button-style1 {
  background-color: var(--button-color);
  color: var(--button-text-color);
  border: none;
  font-size: calc(var(--screenScalingFactor) * 14px);
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

.button-style1:focus {
  outline: clamp(2px, calc(var(--screenScalingFactor) * 5px), 5px) solid var(--button-text);
  outline-offset: calc(var(--screenScalingFactor) * 2px);
}

.button-style1:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.button-style2 {
  margin-top: calc(var(--screenScalingFactor) * 30px);
  height: calc(var(--screenScalingFactor) * 100px);
  width: clamp(200px, 80%, 600px);
  background-color: var(--button-color2);
  color: var(--button-text-color);
  border: 2px solid var(--button-border-color2);
  border-radius: calc(var(--screenScalingFactor) * 45px);
  font-size: calc(var(--screenScalingFactor) * 35px);
  cursor: pointer;
}
  
.button-style2:active:hover {
  background-color: var(--button-hover-color);
}
  
.button-style2:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.message-style {
  color: var(--message-text-color);
}

.error-style {
  color: var(--error-text-color);
}

.click-element:hover, .click-element:focus, .click-element:active {
  -webkit-transform: scale(1.0);
  transform: scale(1.0);
  cursor: pointer;
}

.click-element:active {
  transform: scale(1.1);
}

.click-element {
  transition: transform 0.2s;
}

.input-wrapper-style1 {
  position: relative;
  border: clamp(1px, calc(var(--screenScalingFactor) * 2px), 3px) solid var(--input-border-color);
  border-radius:clamp(3px, calc(var(--screenScalingFactor) * 22.43px),10px);
}

.input-wrapper-style1 input {
  height: clamp(35px, calc(var(--screenScalingFactor) * 132.5px), 200px); 
  width: 100%;
  padding-left: 15%; /* Adjust padding to make room for icons */
  padding-right: 15%;
  background-color: transparent;
  border: none; /* Remove border from input since we're styling the wrapper */
  color: var(--input-text-color); /* Text color */
  -webkit-text-fill-color: var(--input-text-color); /* For webkit browsers */
  -webkit-box-shadow: 0 0 0px 1000px transparent inset; /* Prevent background color change on Safari */
}

.input-wrapper-style1 input:focus {
  outline: none; /* Remove Chrome's default outline */
}

.input-wrapper-style1 input:-webkit-autofill,
.input-wrapper-style1 input:-webkit-autofill:hover, 
.input-wrapper-style1 input:-webkit-autofill:focus, 
.input-wrapper-style1 input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 5000s ease-in-out 0s; /* Delay transition to prevent flash */
}

.input-wrapper-style2 {
  position: relative;
  height: calc(var(--screenScalingFactor) * 100px); /* Same height as button */
  width: clamp(200px, 80%, 600px); /* Same width as button */
  border: 2px solid var(--input-border-color); /* Match button's border thickness */
  border-radius: calc(var(--screenScalingFactor) * 45px); /* Match button's radius */
  display: inline-block; /* Ensure it respects width like the button */
}

.input-wrapper-style2 input {
  height: 100%;
  width: 100%;
  background-color: transparent;
  border: none;
  color: var(--secondary-text-color);
  font-size: calc(var(--screenScalingFactor) * 40px);
  padding: calc(var(--screenScalingFactor) * 40px);
}

.input-wrapper-style2 input:focus {
  outline: none; /* Remove Chrome's default outline */
}

.input-wrapper-style2 input:disabled {
  opacity: 0.5; /* Fades the text */
  color: var(--input-text-color); /* Keep color, just faded */
  -webkit-text-fill-color: var(--input-text-color); /* Webkit consistency */
  cursor: not-allowed; /* Matches button */
}

/* Optional: Style the wrapper when input is disabled */
.input-wrapper-style2:has(input:disabled) {
  opacity: 0.5; /* Fades the wrapper and border */
  border-color: var(--input-border-color-disabled, gray); /* Optional muted border */
}

.input-wrapper-style2 input:-webkit-autofill,
.input-wrapper-style2 input:-webkit-autofill:hover, 
.input-wrapper-style2 input:-webkit-autofill:focus, 
.input-wrapper-style2 input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 5000s ease-in-out 0s; /* Delay transition to prevent flash */
}

.menu-display-style1 {
  position: fixed;
  top: 20vh;
  height: 50vh; /* Flexible height context for centering, adjust as needed */
  width: 100%;
  z-index: 91;
  display: flex; /* Add flex to center the container */
  justify-content: center; /* Center vertically in this outer container */
  align-items: center; /* Center horizontally if needed */
}

.menu-container-style1 {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
}

.menu-wrapper-style1 {
  position: relative;
  width: clamp(70%, 70%, 900px);
  background: var(--menu-color);
  border: clamp(1px, calc(var(--screenScalingFactor) * 5px), 3px) solid var(--menu-border-color);
  border-radius: calc(var(--screenScalingFactor) * 50px);
  padding: calc(var(--screenScalingFactor) * 20px) calc(var(--screenScalingFactor) * 10px); /* Simplified padding */
  display: flex; /* Use flexbox */
  flex-direction: column; /* Stack items vertically */
  justify-content: center; /* Vertically center all children */
}

.menu-heading-text-style1 {
  margin-top: calc(var(--screenScalingFactor) * 100px);
  margin-bottom: calc(var(--screenScalingFactor) * 25px);
  font-size: calc(var(--screenScalingFactor) * 40px);
  color: var(--menu-text-color);
  text-align: center;
}

.menu-button-group1 {
  display: flex;
  flex-direction: column; /* Stack buttons vertically */
  align-items: center; /* Center buttons horizontally */
  width: 100%; /* Ensure it takes up wrapper’s width for centering */
  gap: calc(var(--screenScalingFactor) * 10px); /* Space between buttons */
  margin-bottom: calc(var(--screenScalingFactor) * 100px);
}

.menu-exit-button {
  position: absolute;
  top: calc(var(--screenScalingFactor) * 40px);
  right: calc(var(--screenScalingFactor) * 40px);
  height: calc(var(--screenScalingFactor) * 25px);
  width: auto;
  object-fit: contain;
}

.form-display-style1 {
  position: fixed;
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(-50%, -50%); /* True centering */
  width: 100%;
  z-index: 91;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-container-style1 {
  position: relative; /* For absolute positioning of error message */
  width: clamp(70%, 70%, 900px);
  background: var(--menu-color);
  border: clamp(1px, calc(var(--screenScalingFactor) * 5px), 3px) solid var(--menu-border-color);
  border-radius: calc(var(--screenScalingFactor) * 50px);
  padding: calc(var(--screenScalingFactor) * 20px); /* Consistent padding */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-exit-button-style1 {
  position: absolute;
  top: calc(var(--screenScalingFactor) * 40px);
  right: calc(var(--screenScalingFactor) * 40px);
  height: calc(var(--screenScalingFactor) * 25px);
  width: auto;
  object-fit: contain;
}

.form-title-style1 {
  margin-top: calc(var(--screenScalingFactor) * 100px); /* Fixed top spacing */
  margin-bottom: calc(var(--screenScalingFactor) * 50px); /* Add space below heading */
  font-size: calc(var(--screenScalingFactor) * 40px);
  color: var(--menu-text-color);
  text-align: center;
}

.form-wrapper-style1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--screenScalingFactor) * 10px); /* Space between elements */
  margin-bottom: calc(var(--screenScalingFactor) * 100px); /* Fixed bottom spacing */
}

.form-error-message-style1 {
  position: absolute;
  bottom: calc(var(--screenScalingFactor) * 20px); /* Within bottom padding */
  left: 0;
  right: 0;
  margin: 0;
  font-size: calc(var(--screenScalingFactor) * 36px);
  color: var(--text-item-title-color);
  text-align: center;
}

.form-exit-button {
  position: absolute;
  top: calc(var(--screenScalingFactor) * 40px);
  right: calc(var(--screenScalingFactor) * 40px);
  height: calc(var(--screenScalingFactor) * 25px);
  width: auto;
  object-fit: contain;
}

.email-icon,
.lock-icon,
.eye-button {
  height: calc(var(--screenScalingFactor) * 32px);
  width: auto;
  object-fit: contain;
}

#full-screens {
  position: relative;
  display: block;
  width: 100%; /* Full width up to max */
  max-width: var(--session-screen-width);
  height: 100vh;
  margin: 0 auto; /* Centers the tablet frame */
  background-color: var(--primary-color); /* Theme color fills the container */
}

#mini-player-container {
  position: fixed;
  bottom: var(--lower-navbar-height);
  height: var(--mini-player-height);
  width: var(--session-screen-width);
  z-index: 9;
}

#mini-player {
  height: var(--mini-player-height);
  display: grid;
  grid-template-columns: 3% 10% 74% 10% 3%;
  grid-template-rows: 50% 50%;
}

#mini-player-mix-cover {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  height: 80%;
  align-self: center;
  justify-self: center;
}

#mini-player-song-name {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  align-self: end;
  margin-left: calc(var(--screenScalingFactor) * 20px);
  font-size: calc(var(--screenScalingFactor) * 40px);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 90%;
}

#mini-player-artist-name {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
  align-self: center;
  justify-self: left;
  margin-left: calc(var(--screenScalingFactor) * 20px);
  font-size: calc(var(--screenScalingFactor) * 25px);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 90%;
}

#mini-player-play-pause-button {
  grid-column: 4 / 5;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  height: calc(var(--screenScalingFactor) * 56px);
  width: auto;
  object-fit: contain;
}

#lower-navbar-container {
  position: fixed;
  bottom: 0;
  height: var(--lower-navbar-height);
  width: var(--session-screen-width);
  z-index: 9;
}

#lower-navbar {
  height: var(--lower-navbar-height);
  background: linear-gradient(to bottom, 
  rgba(13, 13, 13, 0.7) 0%, 
  rgba(46, 18, 70, 0.8) 50%, 
  rgba(77, 36, 112, 1) 100%);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: 46.3fr 25.9fr 27.8fr;
  justify-items: center;
}

#lower-navbar img {
  grid-row: 1;
  align-self: end;
}

#lower-navbar p {
  font-size: calc(var(--screenScalingFactor) * 30px);
  color: var(--text-color);
  grid-row: 2;
  align-self: end;
}

.navbar-button {
  height: calc(var(--screenScalingFactor) * 56px);
  width: auto;
  object-fit: contain;
}

#home-screen-button {
  grid-column: 1;
}

#home-screen-button-text {
  grid-column: 1;
}

#my-favorites-screen-button {
  grid-column: 2;
}

#my-favorites-screen-button-text {
  grid-column: 2;
}

#player-screen-button {
  grid-column: 3;
}

#player-screen-button-text {
  grid-column: 3;
}

#my-playlists-screen-button {
  grid-column: 4;
}

#my-playlists-screen-button-text {
  grid-column: 4;
}

#settings-screen-button {
  grid-column: 5;
}

#settings-screen-button-text {
  grid-column: 5;
}

.display-none {
  display: none;
}

/* Scrolling CSS */

.snaps-inline {
  scroll-snap-type: inline mandatory;
}

.snaps-inline >* {
  scroll-snap-align: center;
}

.sortable-ghost {
  cursor: normal !important;
}

.toggle-switch {
  position: relative;
  width: calc(var(--screenScalingFactor) * 90px);
  height: calc(var(--screenScalingFactor) * 45px);
  background-color: var(--toggle-switch-color);
  border-radius: calc(var(--screenScalingFactor) * 45px);
  transition: background-color 0.3s;
  grid-row: 0; /* Value set dynamically */
  grid-column: 0; /* Value set dynamically */
  justify-self: center;
  align-self: center;
}

.toggle-switch .toggle-slider {
  position: absolute;
  top: calc(var(--screenScalingFactor) * 7px);
  left: calc(var(--screenScalingFactor) * 5px);
  width: calc(var(--screenScalingFactor) * 30px);
  height: calc(var(--screenScalingFactor) * 30px);
  background-color: var(--toggle-slider-color);
  border-radius: 50%;
  transition: left 0.3s;
}

.toggle-switch.on {
  background-color: var(--secondary-color);
}

.toggle-switch.on .toggle-slider {
  left: calc(var(--screenScalingFactor) * 55px);
}

.toggle-switch.disabled {
  opacity: 0.3;
  pointer-events: none;
}
