/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --color-page: #f9f3e7;
  --color-shell: #fff9ee;
  --color-surface: #fffdf8;
  --color-surface-soft: rgba(255, 249, 238, 0.75);
  --color-text: #17120f;
  --color-muted: #5d554d;
  --color-subtle: #7b6f5f;
  --color-border: #dfd5c3;
  --color-primary: #17120f;
  --color-primary-text: #fff9ee;
  --color-feed: #ffd05b;
  --color-feed-soft: #fff4cf;
  --color-feed-text: #5d3f00;
  --color-sleep: #aee0ff;
  --color-sleep-soft: #e7f6ff;
  --color-sleep-text: #21485e;
  --color-danger: #c94a4a;
  --shadow-shell: 0 0 80px rgba(23, 18, 15, 0.10);
  --shadow-inset: inset 0 -2px 0 rgba(23, 18, 15, 0.08);
}

body[data-theme="health_ring"] {
  --color-page: #f4ecdd;
  --color-shell: #f7efe2;
  --color-surface: #f7efe2;
  --color-surface-soft: rgba(247, 239, 226, 0.78);
  --color-text: #1d1d1b;
  --color-muted: #6f665d;
  --color-subtle: #6f665d;
  --color-border: rgba(29, 29, 27, 0.12);
  --color-primary: #1d1d1b;
  --color-primary-text: #f7efe2;
  --color-feed: #f3a6d3;
  --color-feed-soft: #f7d85f;
  --color-feed-text: #1d1d1b;
  --color-sleep: #b9cdea;
  --color-sleep-soft: #dce9f7;
  --color-sleep-text: #1d1d1b;
  --shadow-shell: none;
}

.app-body {
  min-height: 100vh;
  background: var(--color-page);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-shell {
  max-width: 64rem;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--color-shell);
  box-shadow: var(--shadow-shell);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-shell) 95%, transparent);
  backdrop-filter: blur(8px);
}

.app-brand-row,
.app-nav,
.app-main {
  max-width: 56rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.app-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  color: var(--color-text);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.app-brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-primary-text);
  font-size: 0.875rem;
}

.theme-dot {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: var(--color-feed);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.app-nav {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  font-size: 1rem;
  font-weight: 700;
}

.app-nav-link {
  border-bottom: 4px solid transparent;
  padding-bottom: 1rem;
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-link:hover,
.app-nav-link.is-active {
  color: var(--color-text);
}

.app-nav-link.is-active {
  border-bottom-color: var(--color-primary);
}

.app-main {
  padding-block: 2.5rem;
}

.page-stack {
  width: 100%;
}

.page-stack > * + * {
  margin-top: 2.5rem;
}

.section-stack > * + * {
  margin-top: 1.5rem;
}

.page-eyebrow {
  color: var(--color-muted);
  font-size: 1.125rem;
  font-weight: 600;
}

.page-title {
  margin-top: 0.75rem;
  color: var(--color-text);
  font-size: 3.75rem;
  line-height: 0.9;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  gap: 1.25rem;
}

.dashboard-grid--two {
  grid-template-columns: 1fr;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  background: var(--color-surface);
  padding: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.summary-card,
.action-card {
  border-radius: 2rem;
  color: var(--color-text);
  box-shadow: var(--shadow-inset);
}

.summary-card {
  padding: 1.5rem;
}

.action-card {
  padding: 1.75rem;
  text-align: center;
}

.feed-card {
  background: var(--color-feed);
}

.sleep-card {
  background: var(--color-sleep);
}

.summary-label,
.action-group-label {
  color: var(--label-color, var(--color-text));
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-label {
  letter-spacing: 0.14em;
}

.summary-label--feed,
.action-group-label--feed {
  --label-color: var(--color-feed-text);
}

.summary-label--sleep {
  --label-color: var(--color-sleep-text);
}

.summary-value {
  margin-top: 1.25rem;
  font-size: 3.75rem;
  line-height: 0.9;
}

.metric-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.metric-card {
  border-radius: 1rem;
  background: var(--color-surface-soft);
  padding: 1rem;
}

.metric-label {
  color: var(--label-color, var(--color-text));
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 0.5rem;
  font-size: 2.25rem;
  line-height: 1;
}

.meta-text {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.empty-text {
  margin-top: 1rem;
  color: var(--color-muted);
  font-weight: 700;
}

.action-card-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.action-card-body {
  margin-top: 1.25rem;
}

.action-card-body > * + * {
  margin-top: 1.25rem;
}

.action-group {
  text-align: left;
}

.action-group-label {
  display: block;
  margin-bottom: 0.5rem;
}

.button-grid {
  display: grid;
  gap: 0.5rem;
}

.button-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 0;
  border-radius: 999px;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-primary-text);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
}

.btn--feed {
  background: var(--color-feed);
  color: var(--color-text);
}

.btn--sleep {
  background: var(--color-sleep);
  color: var(--color-text);
}

.date-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 1.5rem;
  background: var(--color-surface);
  padding: 1rem;
}

.date-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  color: var(--color-subtle);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.date-input {
  margin-top: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-shell);
  padding: 0.5rem 1rem;
  font-weight: 700;
}

.recent-list {
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  background: var(--color-surface);
  overflow: hidden;
}

.recent-list > * + * {
  border-top: 1px solid var(--color-border);
}

.recent-item {
  display: block;
  padding: 1rem;
  text-decoration: none;
}

.recent-item:hover {
  background: color-mix(in srgb, var(--color-feed) 18%, var(--color-surface));
}

.timeline-track {
  position: relative;
  height: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: transparent;
}

.timeline-segment {
  position: absolute;
  top: 0.25rem;
  height: 1.5rem;
  border-radius: 999px;
}

.timeline-now {
  position: absolute;
  top: -0.35rem;
  width: 0.125rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--color-danger);
}

.timeline-now-label {
  position: absolute;
  top: -1.15rem;
  transform: translateX(-50%);
  color: var(--color-danger);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-ticks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  color: var(--color-subtle);
  font-size: 0.75rem;
  font-weight: 700;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.timeline-key {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
}

.live-progress {
  position: relative;
}

.live-event-segment {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--color-danger);
  opacity: 0.85;
}

@media (min-width: 420px) {
  .button-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 40rem) {
  .app-nav {
    font-size: 1.125rem;
  }

  .page-title {
    font-size: 4.5rem;
  }

  .dashboard-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .date-panel,
  .date-form {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

body[data-theme="health_ring"] {
  background: #f4ecdd;
  color: #1d1d1b;
}

body[data-theme="health_ring"] .app-display {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
}

body[data-theme="health_ring"] .bg-\[\#f9f3e7\],
body[data-theme="health_ring"] .bg-\[\#fff9ee\],
body[data-theme="health_ring"] .bg-\[\#fffdf8\],
body[data-theme="health_ring"] .bg-\[\#fff9ee\]\/75,
body[data-theme="health_ring"] .bg-\[\#fff9ee\]\/95 {
  background-color: #f7efe2;
}

body[data-theme="health_ring"] .shadow-\[0_0_80px_rgba\(23\,18\,15\,0\.10\)\] {
  box-shadow: none;
}

body[data-theme="health_ring"] header {
  border-bottom-color: rgba(29, 29, 27, 0.08);
}

body[data-theme="health_ring"] .border-\[\#dfd5c3\],
body[data-theme="health_ring"] .border-\[\#d4a52c\],
body[data-theme="health_ring"] .border-\[\#e6b63c\],
body[data-theme="health_ring"] .border-\[\#8ac8ec\] {
  border-color: rgba(29, 29, 27, 0.12);
}

body[data-theme="health_ring"] .text-\[\#17120f\],
body[data-theme="health_ring"] .text-\[\#5d3f00\],
body[data-theme="health_ring"] .text-\[\#21485e\] {
  color: #1d1d1b;
}

body[data-theme="health_ring"] .text-\[\#5d554d\],
body[data-theme="health_ring"] .text-\[\#7b6f5f\] {
  color: #6f665d;
}

body[data-theme="health_ring"] .bg-\[\#17120f\] {
  background-color: #1d1d1b;
}

body[data-theme="health_ring"] .text-\[\#fff9ee\] {
  color: #f7efe2;
}

body[data-theme="health_ring"] .bg-\[\#ffd05b\],
body[data-theme="health_ring"] .has-\[\:checked\]\:bg-\[\#ffd05b\]:has(:checked) {
  background-color: #f3a6d3;
}

body[data-theme="health_ring"] .bg-\[\#aee0ff\],
body[data-theme="health_ring"] .has-\[\:checked\]\:bg-\[\#aee0ff\]:has(:checked) {
  background-color: #b9cdea;
}

body[data-theme="health_ring"] .bg-\[\#fff4cf\] {
  background-color: #f7d85f;
}

body[data-theme="health_ring"] .bg-\[\#e7f6ff\],
body[data-theme="health_ring"] .bg-\[\#e9f6ff\] {
  background-color: #dce9f7;
}

body[data-theme="health_ring"] .bg-\[\#fff4d8\] {
  background-color: #f5e7c7;
}

body[data-theme="health_ring"] .bg-\[\#d9f3dc\] {
  background-color: #c4d38a;
}

body[data-theme="health_ring"] .bg-\[\#ffe2e2\] {
  background-color: #f6d8e8;
}

body[data-theme="health_ring"] .bg-\[\#a86f00\] {
  background-color: #f1c84f;
}

body[data-theme="health_ring"] .bg-\[\#e3b13f\] {
  background-color: #f0a8d6;
}

body[data-theme="health_ring"] .bg-\[\#6faed2\] {
  background-color: #aac4e4;
}

body[data-theme="health_ring"] .bg-\[\#c94a4a\] {
  background-color: #e95868;
}

body[data-theme="health_ring"] .text-\[\#c94a4a\],
body[data-theme="health_ring"] .text-\[\#8a2929\],
body[data-theme="health_ring"] .text-\[\#24542a\] {
  color: #1d1d1b;
}

body[data-theme="health_ring"] .focus\:outline-\[\#ffd05b\]:focus,
body[data-theme="health_ring"] .focus\:outline-\[\#aee0ff\]:focus {
  outline-color: #f3a6d3;
}

body[data-theme="health_ring"] .has-\[\:checked\]\:border-\[\#17120f\]:has(:checked),
body[data-theme="health_ring"] .ring-\[\#17120f\] {
  border-color: #1d1d1b;
  --tw-ring-color: #1d1d1b;
}

body[data-theme="health_ring"] .hover\:bg-\[\#3a2f29\]:hover {
  background-color: #30302d;
}

body[data-theme="health_ring"] .hover\:bg-\[\#fff4d8\]:hover,
body[data-theme="health_ring"] .hover\:bg-\[\#ffe2e2\]:hover {
  background-color: #f5dfed;
}
