/* The apps' home: welcome, good sessions coming up, your spots. */
@layer components {
  .for-you {
    --for-you-surface: #f5f5f5;
    --for-you-border: #ebebeb;
    --for-you-muted: #555555;

    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0 2.5rem;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .for-you {
      --for-you-surface: #1e293b;
      --for-you-border: #334155;
      --for-you-muted: #94a3b8;
    }
  }

  [data-theme="dark"] .for-you {
    --for-you-surface: #1e293b;
    --for-you-border: #334155;
    --for-you-muted: #94a3b8;
  }

  /* ---- Welcome (signed out, or no favorites yet) ---- */
  .for-you__welcome {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
    background: var(--for-you-surface);
  }

  .for-you__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
  }

  .for-you__text {
    margin: 0.5rem 0 0;
    color: var(--for-you-muted);
  }

  .for-you__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
  }

  .for-you__button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1.1rem;
    border-radius: 999px;
    background: #e6e6e6;
    color: #111827;
    font-weight: 600;
    text-decoration: none;
  }

  .for-you__button--primary {
    background: #111827;
    color: #ffffff;
  }

  /* ---- Sections ---- */
  .for-you__heading-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }

  .for-you__heading {
    margin: 0 0 0.6rem;
    font-size: 1.25rem;
    font-weight: 600;
  }

  .for-you__link {
    font-size: 0.85rem;
    color: var(--for-you-muted);
  }

  .for-you__empty,
  .for-you__note {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--for-you-muted);
  }

  .for-you__sessions,
  .for-you__spots {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .for-you__sessions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  /* ---- A session ---- */
  .for-you__session {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: var(--for-you-surface);
    color: inherit;
    text-decoration: none;
  }

  .for-you__when {
    display: flex;
    flex: 0 0 auto;
    min-width: 5.5rem;
    white-space: nowrap;
    flex-direction: column;
  }

  .for-you__day {
    font-weight: 600;
    text-transform: capitalize;
  }

  .for-you__hours,
  .for-you__sport,
  .for-you__spot-place {
    font-size: 0.8rem;
    color: var(--for-you-muted);
  }

  .for-you__session-text,
  .for-you__spot-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
  }

  .for-you__spot-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ---- A favorite ---- */
  .for-you__spots li {
    border-bottom: 1px solid var(--for-you-border);
  }

  .for-you__spot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 64px;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
  }

  .for-you__thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
  }

  .for-you__now,
  .for-you__conditions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
  }

  .for-you__wind {
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-weight: 600;
    color: #111827;
    font-variant-numeric: tabular-nums;
  }

  .for-you__wave {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4338ca;
    font-variant-numeric: tabular-nums;
  }

  .for-you__arrow {
    font-size: 0.6rem;
  }

  :is(.for-you__wind, .for-you__wave) small {
    font-size: 0.7rem;
    font-weight: 400;
  }
}
