:root {
  --primaryColor: #d97904;
  --primaryHover: #bd6902;
  --lightBackground: white;
  --darkBackground: #21242b;
  --lightText: black;
  --darkText: #ccc;
  --dayBoxLight: #f9f8ee;
  --dayBoxDark: #171a20;
}

/* Reset and General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  text-align: center;
  background-color: var(--lightBackground);
  color: var(--lightText);
  transition: background 0.3s, color 0.3s;
  font-size: 16px;
  background: url("/assets/images/background.png") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}

h3 {
  font-weight: 500;
}

.txt-lg {
  font-size: 1.3rem;
}

.txt-xl {
  font-size: 1.5rem;
}

/* Dark Mode */
.dark-mode {
  background-color: var(--darkBackground);
  color: var(--darkText);
}

/* Dark Mode Toggle Button */
#modeToggleContainer {
  padding: 0.5rem 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #e2e2e4;
  transition: 0.3s;
}
.dark-mode #modeToggleContainer {
  border-bottom: 1px solid #1e1e1e;
}

.checkbox {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.checkbox-label {
  background-color: #111;
  width: 50px;
  height: 26px;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease;
}

.fa-moon {
  color: #fff;
  font-size: 14px;
}

.fa-sun {
  color: var(--primaryColor);
  font-size: 14px;
}

.checkbox-label .ball {
  background-color: #fff;
  width: 22px;
  height: 22px;
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  transition: transform 0.3s ease, background 0.3s ease;
}

.checkbox:checked + .checkbox-label {
  background-color: #e8e8e8; /* Light mode background */
}

.checkbox:checked + .checkbox-label .ball {
  transform: translateX(24px) translateY(-50%);
  background-color: #222; /* Dark mode ball */
}

/* Optional: Improve container responsiveness */
.container {
  max-width: 650px;
  margin: 0 auto;
  padding: 10px;
  text-align: center;
}

/* Calendar Controls and Buttons */
.calendar-controls,
.view-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0.5rem auto;
  flex-wrap: wrap;
  align-items: center;
}

.view-buttons {
  justify-content: center;
}

/* Buttons */
button {
  padding: 0.4rem;
  border: none;
  cursor: pointer;
  background-color: var(--primaryColor);
  color: white;
  border-radius: 5px;
  font-size: 1rem;
  transition: 0.3s;
}

button:hover {
  background-color: var(--primaryHover);
}

/* Mood Buttons */
.mood-section button {
  background: #fcf6e2;
  color: var(--primaryHover);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.dark-mode .mood-section button {
  background-color: var(--dayBoxDark);
  color: var(--darkText);
}

.mood-section button:hover {
  background-color: #fcedbf;
  box-shadow: rgb(189, 105, 2) 0px 2px 4px, rgb(250, 246, 198) 0px 2px 4px;
}

.dark-mode .mood-section button:hover {
  background-color: #000;
  color: #fff;
}
#modeToggleContainer button {
  font-size: 0.8rem;
}
/* Disabled Buttons */
button:disabled,
button[disabled] {
  background-color: inherit;
  color: var(--primaryHover);
  border: 1px solid var(--primaryHover) !important;
  font-weight: 600;
  cursor: auto;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.day-name-box {
  font-weight: bold;
  background-color: #faf6c6;
  border-radius: 0.25rem;
  border: 1px solid #eee46a;
  transition: background 0.3s;
}

.dark-mode .day-name-box {
  background-color: #000000;
  border: 1px solid #465579;
}

/* Day Box Styling */
.day-box,
.single-day {
  padding: 0.1rem;
  border: 1px solid #ddd;
  cursor: pointer;
  background: var(--dayBoxLight);
  border-radius: 0.25rem;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, border 0.3s;
}

.single-day {
  font-size: 1.2rem;
}

.dark-mode .day-box,
.dark-mode .single-day {
  background-color: var(--dayBoxDark);
  border: 1px solid #2c354b;
}

/* Highlight Today */
.day-box.today {
  background: #faf6c6;
  font-weight: bold;
  color: var(--primaryHover);
  border: 1px solid #eee46a;
}

.dark-mode .day-box.today {
  background: #111317;
  font-weight: bold;
  border: 1px solid #465579;
  color: var(--primaryHover);
}

/* Mood Selection Section */
.mood-section {
  margin: 0.5rem 0;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.mood-summary {
  margin-top: 1rem;
  padding: 10px;
  background: #f9f8ee;
  border-radius: 5px;
}

.dark-mode .mood-summary {
  background: #171a20;
  color: #ccc;
}

.mood-summary ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.mood-summary li {
  padding: 0.25rem;
  background-color: #faf6c6;
  border-radius: 0.25rem;
}
.dark-mode .mood-summary li {
  padding: 0.25rem;
  background-color: #111317;
}
