/*
 * Strefa mieszkańca — układ z submenu i lista wiadomości.
 *
 * Wyłącznie wartości przez var(--token) z tokens.css.
 */

/* ——— Układ ——— */

/*
 * Kolumny w proporcji zamiast szerokości z makiety: przy skali czcionki 1,5 stała
 * szerokość submenu łamałaby najdłuższą pozycję na trzy wiersze.
 */
.resident-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-sm);
}

/* ——— Submenu ——— */

.resident-nav__menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0;
  padding: var(--space-sm);
  border-left: 2px solid var(--color-border);
  list-style: none;
}

.resident-nav__menu a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.resident-nav__menu a:hover {
  text-decoration: underline;
}

.resident-nav__menu .current-menu-item a {
  color: var(--color-text);
}

/* ——— Filtr rocznika ——— */

.year-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.year-filter__control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/*
 * Obramowanie na kolorze pomocniczym, nie na --color-border z makiety: jasna szarość
 * daje na tle strony 1,1:1, a granica pola formularza potrzebuje 3:1.
 */
.year-filter__select {
  padding: var(--space-xs) calc(var(--space-lg) - var(--space-2xs)) var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-text-muted);
  border-radius: var(--radius);
  background-color: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  appearance: none;
}

.year-filter .icon--chevron {
  position: absolute;
  right: var(--space-xs);
  width: 0.5rem;
  height: auto;
  color: var(--color-accent);
  transform: rotate(90deg);
  pointer-events: none;
}

/* .button powstał dla linków — w <button> trzeba jeszcze zdjąć wygląd przeglądarki. */
.year-filter__submit {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: none;
  font-family: var(--font-family);
  cursor: pointer;
}

/* ——— Pozycja listy ——— */

.resident-item {
  padding: var(--space-md) 0;
  border-bottom: 2px solid var(--color-border);
}

.resident-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  margin: 0 0 var(--space-xs);
  font-size: var(--font-size-xs);
}

.resident-item__date {
  color: var(--color-text-muted);
}

.resident-item__category {
  padding: var(--space-2xs) var(--space-xs);
  border: 1px solid var(--color-text-muted);
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.resident-item__title {
  margin: 0;
  font-weight: 400;
  font-size: var(--font-size-lg);
}

.resident-item__title a {
  color: inherit;
  text-decoration: none;
}

.resident-item__title a:hover {
  text-decoration: underline;
}

/* ——— Telefon ——— */

/* Breakpoint wpisany wprost — warunek @media nie przyjmuje var(). 48rem ≈ 768 px. */
@media (max-width: 48rem) {
  .resident-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
