/* #region ==== Card Template */

.widget-header {
  display: flex;
  gap: 3px;
  width: 100%;
  align-items: center;
  margin-bottom: clamp(6px, 4.29px + 0.536vw, 12px);
}

.widget-icon {
  width: var(--svg);
  height: var(--svg);
  flex-shrink: 0;
}

.widget-label {
  font-size: clamp(14px, 12.86px + 0.357vw, 18px);
  color: var(--white);
}

.widget-card {
  background-color: var(--table-bg);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  padding: clamp(6px, 4.29px + 0.536vw, 12px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 1;
  width: 190px;
  height: 190px;
  overflow-y: auto;
  scrollbar-width: none;
}

.widget-card::-webkit-scrollbar {
  display: none;
}

/* #endregion */

/* #region Overlay */

.widget-edit-panel {
  position: relative;
  z-index: 1;
}

.widget-show-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
}

/* #endregion */

/* #region ===== Hydration ===== */

.water-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  align-items: center;
}

.water-drop-wrap {
  display: flex;
  justify-content: space-between;
}

.widget-card.water {
  background-color: rgb(37, 198, 251, 0.2);
}

.widget-icon.water {
  color: rgb(37, 198, 251);
}

.water-drop-svg {
  width: clamp(64px, 57.71px + 1.964vw, 86px);
  height: clamp(64px, 57.71px + 1.964vw, 86px);
  color: rgb(37, 198, 251);
}

.water-controls {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

.water-control-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#water-val {
  font-size: clamp(14px, 12.86px + 0.357vw, 18px);
  text-align: center;
  width: fit-content;
}

.water-btn-svg {
  width: var(--svg);
  height: var(--svg);
  color: rgb(161, 161, 161);
}

/* #endregion */

/* #region ===== Supplements ===== */

.widget-card.supp {
  background-color: rgba(139, 92, 246, 0.12);
}

.supp-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 3px;
}

#supp-list {
  display: flex;
  flex-direction: column;
  justify-content: start;
  width: 100%;
}

.supp-name {
  font-size: var(--text);
}

.supp-check-name {
  display: flex;
  align-items: center;
}

.supp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.supp-add-row {
  display: flex;
  width: 100%;
  gap: 3px;
}

#supp-input {
  all: unset;
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: var(--text);
}

.add-supp-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.add-supp-svg {
  width: var(--svg);
  height: var(--svg);
  flex-shrink: 0;
  color: var(--light-blue);
}

.del-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.widget-icon.supp {
  color: rgba(139, 92, 246);
}

.check-svg {
  width: var(--svg);
  height: var(--svg);
  flex-shrink: 0;
  color: var(--orange);
}

.uncheck-svg {
  width: var(--svg);
  height: var(--svg);
  flex-shrink: 0;
  color: var(--light-gray);
}

.check-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* #endregion */

/* #region ===== Weight ===== */

.weight-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  align-items: center;
}

.widget-card.weight {
  background-color: rgb(255, 128, 0, 0.2);
}

.widget-icon.weight {
  color: rgb(255, 128, 0);
}

.add-weight-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.add-weight-svg {
  width: var(--svg);
  height: var(--svg);
  flex-shrink: 0;
  color: var(--light-blue);
}

.weight-add-row {
  display: flex;
  width: 100%;
  gap: 3px;
}

#weight-input {
  all: unset;
  flex: 1;
  min-width: 0;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: var(--text);
}

#weight-val {
  font-size: clamp(22px, 18.57px + 1.071vw, 34px);
}

#weight-diff {
  font-size: clamp(14px, 11.71px + 0.714vw, 22px);
  display: flex;
}

.weight-down {
  color: #22c55e;
}
.weight-up {
  color: var(--red);
}

.unit-toggle {
  all: unset;
  display: flex;
  flex: 1;
  min-width: 20px;
  justify-content: center;
  font-size: clamp(14px, 12.86px + 0.357vw, 18px);
  background: var(--light-gray);
  padding: 2px 5px;
  border-radius: 6px;
  cursor: pointer;
}

.widget-header.special {
  justify-content: space-between;
}

.special-icon-title {
  display: flex;
  gap: 3px;
  width: 100%;
  align-items: center;
}

/* #endregion */

/* #region ===== Notes ===== */

.widget-card.notes {
  background-color: rgb(155, 155, 155, 0.2);
}

.widget-icon.notes {
  color: rgb(155, 155, 155);
}

.notes-text {
  box-sizing: border-box;
  color: white;
  font-size: var(--text);
  background-color: rgb(61, 61, 61);
  font-family: "Cal Sans";
  border: none;
  border-radius: 10px;
  padding: 10px;
  outline: none;
  resize: none;
  width: 100%;
  height: 100%;
}

/* #endregion */

/* #region Thumbnails */

.widget-container-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.widget-thumbnail-wrap {
  display: flex;
  flex-direction: row;
  gap: 5px;
}

.widget-thumbnail {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  padding: 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.widget-thumbnail:active {
  transform: scale(0.95);
}

.widget-thumbnail.hydration {
  background-color: rgb(37, 198, 251, 0.2);
}

.widget-thumbnail.supplements {
  background-color: rgba(139, 92, 246, 0.12);
}

.widget-thumbnail.notes {
  background-color: rgb(155, 155, 155, 0.2);
}

.widget-thumbnail.weight {
  background-color: rgb(255, 128, 0, 0.12);
}

.widget-svg {
  width: clamp(26px, 22.86px + 0.982vw, 40px);
  height: clamp(26px, 22.86px + 0.982vw, 40px);
}

.widget-svg.hydration {
  color: rgb(37, 198, 251);
}

.widget-svg.supplements {
  color: rgba(139, 92, 246);
}

.widget-svg.notes {
  color: rgb(155, 155, 155);
}

.widget-svg.weight {
  color: rgb(255, 128, 0);
}

/* #endregion */
