/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  color: #111;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh; /* not min-height */
}

/* Header */
.minimal-header {
  padding: 1.5rem 2rem;
  text-align: left;
}

.header {
  color: #444;           /* softer dark gray instead of almost black */
  font-weight: 500;      /* medium weight, less heavy than bold */
  font-size: 0.9rem;
  margin: 0.5rem 0 0.5rem;
  letter-spacing: 0.02em; /* subtle letter spacing for elegance */
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
  margin: 0; /* remove default h1 spacing */
}

/* Hero Section */
.hero-minimal {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  text-align: center;
  flex-direction: column;
}

.stats-floating {
  position: absolute;
  top: -1rem;
  right: 2rem;
  font-size: 0.85rem;
  color: #333;
  background-color: transparent;
  border: 1px solid #ccc;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-align: left;
  white-space: nowrap;
  line-height: 1.4;
  font-family: 'Inter', sans-serif;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Stats overlay positioned absolutely within container */
.stats-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  color: #333;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  user-select: none;
  text-align: center;
  padding: 0 0.5rem;
  z-index: 10; /* Keep above content in container */
}

/* Optional mobile styling */
@media (max-width: 600px) {
  #statsContent {
    font-size: 0.9rem;
  }
  .stats-overlay {
    background: rgba(255, 255, 255, 0.6);
    padding: 0 0.25rem;
  }
}

#statsContent {
  position: relative;
  transition: opacity 0.3s ease; /* smooth fade when opacity changes */
}



@media (max-width: 768px) {
  .stats-floating {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto 0 auto;
    text-align: center;
    white-space: normal;
    box-shadow: none;
    /* Manual horizontal offset */
    --horizontal-shift: 32px; /* default: no shift */

    /* Use the variable with translateX for horizontal shift */
    transform: translateX(var(--horizontal-shift));
  }
}


.hero-container {
  max-width: 600px;
  width: 100%;
}

.main-question {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #000;
}


.decision-input {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.decision-input:focus {
  border-color: #0077cc;
  outline: none;
}

.btn-primary {
  display: inline-block;
  background-color: #0077cc;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #005fa3;
}

#readonlyCompleted div[draggable="true"] {
  cursor: grab;
}

#readonlyCompleted div.dragging {
  opacity: 0.5;
  border: 2px dashed #0077cc;
}
s

.secondary-link {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #0077cc;
  text-decoration: none;
}


.secondary-link:hover {
  text-decoration: underline;
}

/* Footer */
.footer-minimal {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: #999;
}

/* Refine spacing */
.main-question {
  margin-bottom: 1.5rem;
}

.hero-cta {
  font-size: 1.1rem;        /* slightly larger font */
  max-width: 300px;         /* more compact width */
  width: 80%;               /* text nearly fills button */
  margin: 0.5rem auto;      /* center and add spacing */
}

.secondary-link {
  margin-top: 0.5rem;
}

.btn-primary.hero-cta {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  padding: 0.75rem;
}

.site-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.logo-combo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.daily-prompt-block {
  background-color: #f0f7ff;
  border: 1px solid #dbefff;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1rem;
}


.streak-box {
  font-size: 0.75rem;
  color: #555;
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 8px;
  text-align: left;
  margin-top: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: 0;
}

.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  margin-left: auto;
}

.auth-btn.subtle-btn {
  background-color: transparent;
  color: #333;
  border: 1px solid #ccc;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: right;
  line-height: 1.3;
  display: inline-block;
  min-width: 0;
  white-space: normal;
}

.auth-btn.subtle-btn:hover {
  background-color: #f7f7f7;
}

/* Show full email on desktop, short on mobile */
.email-full {
  display: inline;
}
.email-short {
  display: none;
}

@media (max-width: 600px) {
  .email-full {
    display: none;
  }
  .email-short {
    display: inline;
  }
}


#lockStatus {
  display: none; /* default hidden */
  font-size: 0.9rem;
  margin-top: 0.25rem;
  color: #0077cc;
}


#currentTaskText {
  font-size: 1.5rem;
  font-weight: 600;
  white-space: pre-wrap;
}

#currentTaskText.placeholder {
  font-size: 1.1rem;
  font-weight: normal;
  color: #444;
}

.placeholder {
  font-weight: normal;
  font-size: 0.85rem;
  color: #777;
}

.tag-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: -2.5rem;
  z-index: 10;
}

.btn-tag:hover {
  color: #0077cc;
}

/* Tag icon inside input */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.input-with-icon input {
  padding-right: 2.5rem;
}

.tag-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #999;
  cursor: pointer;
}

/* Tag menu styling */
.tag-menu {
  position: absolute;
  top: 33%;
  left: 60%;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 0.75rem;
  z-index: 99;
  display: none;
  white-space: nowrap;
  min-width: 120px;
}

.tag-menu label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #333;
  text-align: left;
}

.new-tag input {
  width: 100%;
  padding: 0.4rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}


    #buttonRow {
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin-top: 1rem;
    }

.fishbowl-reminder {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  font-family: 'Inter', sans-serif;
}

.fishbowl-reminder.hidden {
  display: none;
}

.reminder-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.reminder-card h3 {
  font-size: 1.4rem;
  margin-top: 0;
}

.reminder-card p {
  font-size: 1rem;
  margin: 1rem 0;
}

.reminder-close {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #777;
  cursor: pointer;
  text-decoration: underline;
}

.streak-display {
  text-align: center;
  font-size: 0.9rem;
  color: #444;
  margin: 0.5rem 0;
}

/* Container holding login + streak */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* Optional enhancement: ensure header flex container aligns items baseline */
.minimal-header .nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.selected-tag-label {
  margin-right: 40px;
  font-size: 0.9rem;
  color: #555;
}

#profile-link {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 100;
}

#profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.onboarding-benefits {
  padding-left: 1.2em;
  margin: 1rem 0;
  list-style: none;
}

.onboarding-benefits li {
  margin-bottom: 0.75rem;
}

.onboarding-benefits .subtext {
  font-size: 0.88rem;
  color: #666;
  margin-top: 0.15rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .onboarding-benefits {
    padding-left: 1em;
    margin: 0.6rem 0;
    font-size: 0.85rem; /* smaller base font for the list */
  }

  .onboarding-benefits li {
    margin-bottom: 0.5rem;
  }

  .onboarding-benefits .subtext {
    font-size: 0.75rem; /* smaller subtext */
    line-height: 1.4;
  }

  /* Optionally reduce headings or other text inside modal */
  #onboarding-content h3 {
    font-size: 1.1rem; /* smaller heading on phones */
  }

  #onboarding-content p,
  #onboarding-content ol {
    font-size: 0.85rem; /* smaller paragraph/ordered list */
  }
}



/* STATS CSS */

/* STATS CSS - Updated for Fishbowl style */

.more-stats-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #0077cc;             /* Fishbowl primary blue */
  font-weight: 500;           /* Medium-bold like buttons */
  font-size: 0.85rem;         /* Slightly smaller than btn-primary */
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  font-family: 'Inter', sans-serif;  /* consistent font */
}

.more-stats-link:hover,
.more-stats-link:focus {
  color: #005fa3;             /* Darker hover blue */
  text-decoration: none;
  outline: none;
}


/* Minimalist heatmap cell */
.heatmap-cell {
  width: 20px;
  height: 20px;
  background-color: #eee;     /* Light neutral background */
  border-radius: 3px;
  transition: background-color 0.3s ease;
  box-shadow: none;
  cursor: default;
}

.heatmap-cell:hover,
.heatmap-cell:focus {
  background-color: #0077cc;  /* Fishbowl blue highlight on hover/focus */
  cursor: pointer;
  outline: none;
}

/* Day labels above heatmap */
.heatmap-day-labels {
  display: flex;
  justify-content: space-between;
  max-width: 520px;
  margin: 12px auto 0;
  font-size: 0.85rem;
  color: #111;                /* Simple black text */
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

/* Chart section container with clean white background and no shadow */
.chart-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: transparent;    /* Transparent background */
  border-radius: 0;
  padding: 1rem 0.5rem;
  box-shadow: none;
  min-height: 350px;
}

/* Chart header - black, simple, crisp */
.chart-header {
  font-size: 1.15rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 1rem;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

/* Heatmap title */
.heatmap-title {
  margin-top: 2.5rem;
  text-align: center;
  color: #111;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

/* Heatmap grid container */
#heatmapGrid {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto 0;
  padding: 1rem 0.5rem;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: 40px repeat(24, 20px);
  grid-gap: 8px 2px;          /* Slightly reduced gap */
  line-height: 1.3;
  font-family: 'Inter', sans-serif;
  align-items: center;
  color: #111;                /* Ensure black text */
}

#heatmapGrid > div {
  box-sizing: border-box;
}

/* Day label styling */
#heatmapGrid > div.day-label {
  padding-bottom: 3px;
  padding-top: 8px;
  vertical-align: middle;
  font-weight: 600;
  color: #111;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  main {
    padding: 1rem 1rem;
    max-width: 100vw; /* full viewport width */
  }

  /* Histogram chart container - make responsive */
  .chart-container {
    max-width: 100%;
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
  }

  /* Responsive scaling of canvas inside chart-container */
  #histogramChart {
    width: 100% !important;
    height: auto !important;
  }

  /* Heatmap grid - allow full width but constrained to container */
  #heatmapGrid {
    max-width: 100%;
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
    display: grid;
    /* Adjust grid to smaller cells */
    grid-template-columns: 30px repeat(24, 14px);
    grid-gap: 6px 1px;
    overflow: visible;
  }

  /* Resize heatmap cells */
  #heatmapGrid .heatmap-cell {
    width: 14px;
    height: 14px;
  }

  /* Day labels smaller */
  .heatmap-day-labels {
    max-width: 100%;
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }

  .chart-header {
    font-size: 1rem;
  }

  .heatmap-title {
    font-size: 1.1rem;
    margin-top: 1rem;
  }
}







@media (max-width: 600px) {
  /* Make both tag menus full-width and on top */
  .tag-menu {
    position: absolute !important;
    left: 0 !important;
    top: 20%;
    max-width: 100vw !important;
    box-sizing: border-box;
    background: #fff;
    z-index: 1000; /* ensure it's above other UI elements */
    padding: 0.5rem;
  }
}


@media (prefers-color-scheme: dark) {
  html {
    background-color: #121212;
    color: #e0e0e0;
  }

  body {
    color: #e0e0e0;
  }

  h1, h2, h3, h4, h5, h6, .logo {
    color: #ffffff;
  }

  .header {
    color: white;
  }

  .btn-primary {
    background-color: #2196f3;
    color: white;
  }

  .btn-primary:hover {
    background-color: #1976d2;
  }

  .auth-btn,
  .auth-btn.subtle-btn {
    background-color: #2c2c2c;
    color: #f0f0f0;
    border: 1px solid #444;
  }

  .auth-btn.subtle-btn:hover {
    background-color: #3a3a3a;
  }

  .reminder-card {
    background: #1e1e1e;
    color: #eee;
  }

  #readonlyCompleted > div {
    background: #1a1a1a;
    color: #ddd;
  }

  #readonlyCompleted button {
    color: #f88;
  }

  input,
  textarea,
  select {
    background-color: #2a2a2a;
    color: #eee;
    border-color: #555;
  }

  .tag-menu,
  #filterTagMenu,
  .daily-prompt-block {
    background-color: #1a1a1a;
    color: #eee;
    border: 1px solid #333;
  }

	.tag-menu label {
	  color: white;
	}

  #profile-link {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
  }

  .selected-tag-label {
    color: #bbb;
  }

  .streak-box,
  .streak-display {
    color: #ccc;
    background-color: #222;
    border-color: #444;
  }

.main-question {
  color: #111;          /* Solid black */
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
}

  .btn-row button.hero-cta {
    background-color: #333;
    color: #eee;
  }

  .btn-row button.hero-cta:hover {
    background-color: #444;
  }
}
