/* ————————————————————————————————————————————
   lil bit cycling v2 — the photo wall

   Square tiles edge to edge with a hairline gap, five across, four on a
   tablet, three on a phone; one continuous wall, or each post's run under a
   slim heading. Above, a region and a country dropdown, pill-shaped.
   ———————————————————————————————————————————— */

.lbc-wall {
  --ink:      #212121;
  --ink-soft: #6e6e6e;
  --rule:     rgba(0, 0, 0, .14);
  --coral:    #fc4c02;
  --sans:     "Quicksand", "helvetica neue", helvetica, arial, sans-serif;
  --gap:      4px;

  font-family: var(--sans);
  color: var(--ink);
}

/* ——— the filter: two dropdowns, pill-shaped, left ——— */

.lbc-wall-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.4rem;
}
/* the parent theme makes a label a full-width block: undone */
.entry-content .lbc-wall-filter .lbc-wall-select {
  position: relative;
  display: inline-block;
  flex: none;
  width: auto;
  margin: 0;
  padding: 0;
}
.lbc-wall-select::after {
  /* the arrow, drawn: a small chevron */
  content: "";
  position: absolute;
  right: .95rem;
  top: 50%;
  width: .38rem;
  height: .38rem;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.entry-content .lbc-wall-select select {
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .6rem 2.3rem .6rem 1rem;
  margin: 0;
  height: auto;
  line-height: 1.2;
  cursor: pointer;
  max-width: 100%;
}
.entry-content .lbc-wall-select select:hover { border-color: rgba(0, 0, 0, .35); }
.entry-content .lbc-wall-select select:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.lbc-wall-filter button {
  font-family: var(--sans);
  font-size: .7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  padding: .6rem 1rem;
}
/* the order sits apart, at the right end of the row */
.entry-content .lbc-wall-filter .lbc-wall-order { margin-left: auto; }
@media (max-width: 600px) {
  .entry-content .lbc-wall-filter .lbc-wall-select { flex: 1 1 0; min-width: 0; }
  /* on a phone it takes a row of its own under region and country */
  .entry-content .lbc-wall-filter .lbc-wall-order { flex: 1 0 100%; margin-left: 0; }
  .entry-content .lbc-wall-select select { width: 100%; letter-spacing: .05em; padding: .6rem 1.9rem .6rem .85rem; }
  .lbc-wall-select::after { right: .8rem; }
}

/* ——— a post's heading ——— */

.lbc-wall-group + .lbc-wall-group { margin-top: 2rem; }
.entry-content h2.lbc-wall-head {
  margin: 0 0 .7rem;
  padding: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}
.entry-content .lbc-wall h2.lbc-wall-head a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink);
  text-decoration: none;
}
.entry-content .lbc-wall h2.lbc-wall-head a:hover { color: var(--coral); }
.lbc-wall-date {
  flex: none;
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
}

/* ——— the grid ——— */

.lbc-wall-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap);
}
@media (max-width: 900px) { .lbc-wall-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lbc-wall { --gap: 2px; } .lbc-wall-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.lbc-wall-tile {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #eee;
}
.entry-content .lbc-wall-tile img.lbc-wall-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
  transition: transform .6s ease, opacity .2s ease;
}
.lbc-wall-tile:hover img.lbc-wall-img,
.lbc-wall-tile:focus-visible img.lbc-wall-img { transform: scale(1.04); }
.lbc-wall-tile:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .entry-content .lbc-wall-tile img.lbc-wall-img { transition: none; }
  .lbc-wall-tile:hover img.lbc-wall-img { transform: none; }
}

/* ——— loading more ——— */

.lbc-wall[aria-busy="true"] .lbc-wall-groups { opacity: .55; transition: opacity .2s ease; }
.lbc-wall-more { margin: 2rem 0 0; text-align: center; }
.lbc-wall-more[hidden] { display: none; }
.lbc-wall-more button {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--coral);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .75rem 1.3rem;
  cursor: pointer;
}
.lbc-wall-more button:hover { border-color: var(--coral); }
.lbc-wall-more button:disabled { opacity: .5; cursor: progress; }

/* the lightbox caption's link to the post */
#baguetteBox-overlay .lbc-wall-from { color: rgba(255, 255, 255, .75); font-size: .9em; text-decoration: underline; text-underline-offset: 2px; }
#baguetteBox-overlay .lbc-wall-from:hover { color: #fff; }
#baguetteBox-overlay .lbc-wall-caption a { color: #fff; }
