/* Thought of the day. A small note window, in the same world as the fairness mail. */

.tod {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.tod[hidden] {
  display: none !important;
}

.tod__dim {
  position: absolute;
  inset: 0;
  background: rgba(60, 50, 44, 0.14);
  cursor: pointer;
}

.tod__window {
  position: relative;
  z-index: 1;
  width: min(24rem, 100%);
  max-height: min(32rem, calc(100dvh - 2.5rem));
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(60, 50, 44, 0.14);
  border-radius: 1.05rem;
  box-shadow:
    0 1px 0 rgba(255, 253, 249, 0.85) inset,
    0 18px 44px rgba(60, 50, 44, 0.1);
}

.tod__window::before {
  content: "";
  display: block;
  height: 0.38rem;
  background: #f8c5c2;
}

.tod__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.72rem 0.45rem 0.7rem 1.05rem;
  border-bottom: 1px solid var(--line);
}

.tod__subject {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  padding-top: 0.28rem;
}

.tod__label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tod__title {
  font-family: var(--font-hand);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.tod__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(60, 50, 44, 0.16);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
}

.tod__close svg {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
}

.tod__close:hover {
  background: #f8c5c2;
  border-color: transparent;
}

.tod__body {
  padding: 1.05rem 1.15rem 1.2rem;
}

.tod__quote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.08rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tod__cite {
  margin: 0.9rem 0 0;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

@media (min-width: 720px) {
  .tod__window {
    transform: translate(1.15rem, 1.35rem) rotate(1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tod__window {
    transform: none;
  }
}
