.water-page {
  max-width: 790px;
  padding-bottom: 18px;
  --water-surface: #ffffff;
  --water-border: #eceef1;
  --water-radius: 16px;
  --water-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.03);
  /* Размер иконок пресетов: 0.8 — меньше, 1 — база, 1.3 — крупнее */
  --water-preset-icon-scale: 1.8;
  --water-preset-icon-size: calc(64px * var(--water-preset-icon-scale));
  /* Фиксированная «ячейка» под иконку — одинаковая высота у всех четырёх кнопок */
  --water-preset-icon-slot: calc(72px * var(--water-preset-icon-scale));
  --water-preset-btn-padding: 8px 6px 10px;
  --water-preset-btn-gap: 8px;
}

.water-page-head {
  margin: 0 0 16px;
}

/* 08.06.2026: было .water-page h1.water-page__title — стили перенесены в template-parts/calorazh-page-title.css */

@media (max-width: 991px) {
  .water-page {
    max-width: 100%;
  }
}

.water-date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 16px;
}

.water-date-nav__btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid #e3e7ed;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.water-date-nav__btn:hover:not(:disabled) {
  border-color: #d4a74c;
  color: #9a7618;
  background: #fffdf6;
}

.water-date-nav__btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.water-date-nav__current {
  min-width: 0;
  flex: 1 1 auto;
  text-align: center;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  color: #1f2937;
}

.water-app {
  --calorazh-days-filled: #0ea5e9;
  --calorazh-days-active: #0284c7;
  --calorazh-days-border: var(--water-border, #eceef1);
}

.water-app .calorazh-days {
  margin-bottom: 14px;
}

.water-app__loading {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 15px;
}

.water-notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.water-notice--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.water-progress {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--water-border, #eceef1);
  border-radius: var(--water-radius, 16px);
  background: var(--water-surface, #fff);
  box-shadow: var(--water-shadow);
}

.water-progress__ring {
  --water-pct: 0%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(#38bdf8 0 var(--water-pct), #e8f4fc var(--water-pct) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(0);
}

.water-progress--over .water-progress__ring {
  background: conic-gradient(#38bdf8 0 100%, #fbbf24 100% 100%);
}

.water-progress__inner {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
}

.water-progress__value {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.water-progress__sub {
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.2;
}

.water-progress__pct {
  font-size: 22px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 8px;
}

.water-progress__bar {
  height: 10px;
  border-radius: 999px;
  background: #e8f4fc;
  overflow: hidden;
}

.water-progress__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
}

.water-progress__pct,
.water-progress__value {
  transition: color 0.25s ease;
}

.water-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--water-preset-btn-gap, 8px);
  margin-bottom: 20px;
}

.water-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 0;
  height: 100%;
  padding: var(--water-preset-btn-padding, 8px 6px 10px);
  box-sizing: border-box;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #f0f9ff;
  color: #0369a1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.water-preset-btn:hover:not(:disabled) {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.water-preset-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.water-preset-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.water-preset-btn__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 100%;
  height: var(--water-preset-icon-slot, 115px);
  line-height: 0;
  margin: 0;
  transition: transform 0.15s ease;
}

.water-preset-btn__icon {
  display: block;
  width: var(--water-preset-icon-size, 64px);
  height: var(--water-preset-icon-size, 64px);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.water-preset-btn__icon-wrap--glass,
.water-preset-btn__icon-wrap--bottle,
.water-preset-btn__icon-wrap--large {
  align-items: center;
  margin: 0;
}

/* У SVG чашки много пустоты сверху — прижимаем рисунок к надписи */
.water-preset-btn__icon-wrap--cup {
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
}

.water-preset-btn__icon--cup {
  object-position: center bottom;
  transform: translateY(4px);
}

.water-preset-btn:hover:not(:disabled) .water-preset-btn__icon-wrap {
  transform: scale(1.06);
}

.water-preset-btn:disabled .water-preset-btn__icon-wrap {
  opacity: 0.5;
  transform: none;
}

.water-preset-btn__label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}

.water-preset-btn__hint {
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.1;
  color: #64748b;
}

.water-entries {
  margin-bottom: 20px;
}

.water-entries__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.water-entries__empty {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

.water-entries__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--water-border, #eceef1);
  border-radius: var(--water-radius, 16px);
  overflow: hidden;
  background: var(--water-surface, #fff);
  box-shadow: var(--water-shadow);
}

.water-entries__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.water-entries__item--enter {
  animation: water-entry-enter 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.water-entries__item--leave {
  animation: water-entry-leave 0.22s ease forwards;
  pointer-events: none;
}

@keyframes water-entry-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes water-entry-leave {
  to {
    opacity: 0;
    transform: translateX(10px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    overflow: hidden;
    border-bottom-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .water-entries__item--enter,
  .water-entries__item--leave {
    animation: none !important;
  }
}

.water-entries__item:last-child {
  border-bottom: 0;
}

.water-entries__amount {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.water-entries__time {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 13px;
  color: #94a3b8;
}

.water-entries__remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.water-entries__remove:hover {
  background: #fef2f2;
  color: #dc2626;
}

.water-profile-target {
  padding: 16px 18px;
  border: 1px solid var(--water-border, #eceef1);
  border-radius: var(--water-radius, 16px);
  background: #f0f9ff;
  box-shadow: var(--water-shadow);
  text-align: center;
}

.water-profile-target__text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.water-profile-target__text strong {
  font-weight: 700;
  color: #0f172a;
}

.water-profile-target__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #38bdf8;
  border: 1px solid #0ea5e9;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.water-profile-target__btn:hover {
  background: #0ea5e9;
  border-color: #0284c7;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.3);
}

.water-guest__banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--water-border, #eceef1);
  border-radius: var(--water-radius, 16px);
  background: var(--water-surface, #fff);
  box-shadow: var(--water-shadow);
}

.water-guest__banner-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.water-guest__banner-actions {
  flex: 0 0 auto;
}

.water-guest__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
}

.water-guest__btn--primary {
  background: #22c55e;
  border: 1px solid #22c55e;
  color: #fff !important;
}

.water-guest__btn--primary:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff !important;
}

.water-guest__preview {
  pointer-events: none;
  user-select: none;
}

.water-guest__preview .water-date-nav__btn,
.water-guest__preview .water-preset-btn,
.water-guest__preview .water-entries__remove,
.water-guest__preview .water-profile-target__btn--guest {
  cursor: default;
}

.water-guest__preview .water-app--demo {
  margin-top: 0;
}

.water-guest__preview .water-preset-btn__icon-wrap {
  display: flex;
}

.water-guest__preview .water-profile-target__btn--guest.is-guest-disabled,
.water-guest__preview .water-profile-target__btn--guest.is-guest-disabled:disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fafafa !important;
  border-color: #e5e7eb !important;
  color: #4b5563 !important;
  cursor: default;
  opacity: 1;
  box-shadow: none;
  pointer-events: none;
}

.water-guest__preview .water-profile-target__btn--guest.is-guest-disabled:hover,
.water-guest__preview .water-profile-target__btn--guest.is-guest-disabled:active {
  background: #fafafa !important;
  border-color: #e5e7eb !important;
  color: #4b5563 !important;
}

/* CTA внизу — [tracker_links], стили в tracker-links.css */
.water-page .water-page-links {
  margin-top: 20px;
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  .water-progress {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .water-progress__meta {
    width: 100%;
  }
}
