/* Treatly Glass — at home on Android (and kind to every phone).
 * Loaded after glass-app.css. Tiers (g-q-high / medium / low) are set by
 * js/glass-android.js from how the phone actually performs. */

/* ---------- feel native ---------- */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* the page is an app: no pull-to-refresh, no rubber band behind it */
  overscroll-behavior: none;
}
/* each scroller keeps its fling to itself */
.g-scroll,
.g-new-body,
.g-set-body,
.g-ob-panel,
.g-people,
.g-gifs {
  overscroll-behavior: contain;
}
/* taps are taps: no long-press menus or text selection on controls */
button,
.gcard,
.g-answer,
.g-kind,
.g-set-row,
.g-chip,
.g-extra,
.g-rail,
.g-tabbar {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}
/* a press lights the glass for a moment, where Android would ripple */
.is-android .g-answer:active,
.is-android .g-kind:active,
.is-android .g-set-row:active,
.is-android .g-review-row:active,
.is-android .g-req:active,
.is-android .g-ob-btn:active,
.is-android .g-extra:active {
  background-color: rgba(255, 255, 255, 0.14);
  transition-duration: 0s;
}
/* a keyboard user always sees where they are */
:focus-visible {
  outline: 2px solid rgba(142, 201, 242, 0.9);
  outline-offset: 2px;
}
button:focus:not(:focus-visible) {
  outline: none;
}
/* Android draws type a touch lighter; firm it up */
.is-android body {
  font-synthesis: none;
}
.is-android .gcard-title,
.is-android .g-set-row strong {
  font-weight: 700;
}
/* installed and full screen: .g-scroll already clears the status bar,
   so the heading takes no extra top inset (adding it doubled the gap) */

/* ---------- the glass, tier by tier ---------- */

/* medium: the same look, lighter blur (half the GPU work per panel) */
.g-q-medium .glass,
.g-q-medium .g-sheet,
.g-q-medium .g-toast,
.g-q-medium .g-tabbar {
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
}
.g-q-medium .g-set-bg,
.g-q-medium .g-ob-bg {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* low: frosted panels without live blur, the grain off, the list still */
.g-q-low .glass,
.g-q-low .g-sheet,
.g-q-low .g-toast,
.g-q-low .g-tabbar,
.g-q-low .g-pill,
.g-q-low .g-set-bg,
.g-q-low .g-ob-bg,
.g-q-low .g-sheet-bg {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.g-q-low .glass,
.g-q-low .g-tabbar {
  /* black glass without the blur: a sheen at the top, near-black below */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 40%), rgba(12, 12, 15, 0.96);
}
.g-q-low .g-sheet,
.g-q-low .g-ob-panel,
.g-q-low .g-set-panel {
  background: linear-gradient(180deg, rgba(38, 38, 44, 0.98), rgba(20, 20, 24, 0.99));
}
.g-q-low .g-set-bg,
.g-q-low .g-ob-bg,
.g-q-low .g-sheet-bg {
  background: rgba(0, 0, 0, 0.82);
}
.g-q-low .gcard-frost {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.06) 100%);
}
.g-q-low .wob {
  transform: none !important;
  will-change: auto;
}
.g-q-low .gcard {
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.3),
    0 10px 24px rgba(0, 0, 0, 0.55);
}

/* ---------- Add to home screen ---------- */

.g-install {
  position: fixed;
  z-index: 96;
  left: 12px;
  right: 12px;
  bottom: calc(var(--safe-b) + 96px);
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 12px;
  border-radius: 24px;
  animation: gInstallIn 0.5s cubic-bezier(0.2, 1.2, 0.3, 1);
}
@keyframes gInstallIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
}
.g-install-icon img {
  display: block;
  border-radius: 12px;
}
.g-install-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.g-install-text strong {
  font-size: 15px;
  font-weight: 800;
}
.g-install-text small {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.g-install-add {
  flex: none;
  height: 38px;
  padding: 0 18px;
  border-radius: 19px;
  font-size: 15px;
  font-weight: 800;
  color: #0a0a0c;
  background: #fff;
}
.g-install-no {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
}
@media (min-width: 760px) {
  .g-install {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 400px;
  }
}

/* ---------- the calendar: all-day tasks above the hours ---------- */
/* (a daily habit or an "any time" task has no hour of its own) */
.g-allday {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px -50px;
  padding: 10px 6px 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.g-allday-label {
  flex: none;
  width: 42px;
  padding-top: 8px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink-3);
}
.g-allday-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.g-ev.g-ev--chip {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  max-width: 100%;
  height: 34px;
  padding: 0 12px;
  flex-direction: row;
  align-items: center;
  border-radius: 12px;
}
.g-ev--chip .g-ev-top {
  min-width: 0;
}
.g-ev--chip .g-ev-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.g-ev--chip .g-ev-gift {
  position: static;
  margin-left: 6px;
}
.g-day-hours {
  position: relative;
}
