/* Photo categories on /gallery_list/ and /gallery_list/category/<slug>/ —
   stills from videos' timed position sections (posts/section_frames.py). */

/* ---- Category cards on the gallery list ---- */
.photo-categories { margin: 14px 0 22px; }
.photo-categories-title {
  margin: 18px 0 10px; color: floralwhite; font-size: 18px; font-weight: 700;
}
.photo-category-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.photo-category-card {
  position: relative; display: block; overflow: hidden; border-radius: 11px;
  aspect-ratio: 16 / 10; background: #17131c; text-decoration: none;
}
.photo-category-card img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .25s ease;
}
.photo-category-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(12, 9, 15, .88));
}
.photo-category-card:hover img, .photo-category-card:focus-visible img { transform: scale(1.05); }
.photo-category-card:focus-visible { outline: 2px solid var(--sage, #a6ac82); outline-offset: 2px; }
.photo-category-name, .photo-category-count { position: absolute; z-index: 1; bottom: 9px; color: floralwhite; }
.photo-category-name { left: 11px; font-size: 16px; font-weight: 700; }
.photo-category-count { right: 11px; font-size: 12px; color: #e3dbe6; }
@media (max-width: 600px) {
  .photo-category-grid { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .photo-category-name { font-size: 14px; }
}

/* ---- Category page ---- */
.photo-category-header { margin: 6px 0 10px; }
.photo-category-back { color: #c5becb; font-size: 13px; text-decoration: none; }
.photo-category-back:hover { color: floralwhite; }
.photo-category-page #section-title { margin: 6px 0 2px; }
.photo-category-sub { margin: 0; color: #c5becb; font-size: 13px; }

.photo-category-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.photo-category-chip {
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
  border: 1px solid rgba(166, 172, 130, .45); color: floralwhite; font-size: 13px; font-weight: 600;
}
.photo-category-chip small { color: #c5becb; font-weight: 400; margin-left: 2px; }
.photo-category-chip:hover { background: rgba(166, 172, 130, .12); }
.photo-category-chip.is-current { background: var(--sage, #a6ac82); border-color: var(--sage, #a6ac82); color: #17131c; }
.photo-category-chip.is-current small { color: #2c2733; }

.photo-video-group {
  margin: 0 0 22px; padding: 12px; border-radius: 12px; background: var(--panel, #241e2c);
}
.photo-video-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px;
}
.photo-video-model { display: inline-flex; align-items: center; gap: 7px; color: #e9657b; font-weight: 700; text-decoration: none; }
.photo-video-model img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.photo-video-title {
  flex: 1 1 200px; min-width: 0; color: floralwhite; font-size: 14px; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.photo-video-title:hover, .photo-video-model:hover span { text-decoration: underline; }
.photo-video-watch {
  padding: 5px 12px; border-radius: 999px; background: #e9657b; color: #fff;
  font-size: 12px; font-weight: 700; text-decoration: none;
}
.photo-video-watch:hover { filter: brightness(1.1); }

.photo-frame-grid {
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
@media (max-width: 600px) { .photo-frame-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; } }
.photo-frame-tile {
  display: block; padding: 0; border: 0; cursor: zoom-in; overflow: hidden;
  aspect-ratio: 16 / 9; border-radius: 6px; background: #17131c;
}
.photo-frame-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.photo-frame-tile:hover img, .photo-frame-tile:focus-visible img { transform: scale(1.04); }
.photo-frame-tile:focus-visible { outline: 2px solid var(--sage, #a6ac82); outline-offset: 2px; }

/* Frames can't be liked: gallery.js hides the heart when there is no like URL. */
.photo-category-page .pv-like[hidden] { display: none !important; }

/* ---- Sort tabs + likes (2026-12-02) ---- */
.photo-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 16px; padding: 4px; border-radius: 12px; background: var(--panel, #241e2c); width: fit-content; max-width: 100%; }
.photo-sort-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px;
  color: #d9d1dc; font-size: 13px; font-weight: 600; text-decoration: none;
}
.photo-sort-link:hover { color: floralwhite; background: rgba(255, 255, 255, .06); }
.photo-sort-link.is-current { background: #e9657b; color: #fff; }
.photo-sort-reshuffle { margin-left: 6px; padding: 0 8px; color: #c5becb; font-size: 12px; }
.photo-sort-reshuffle:hover { color: floralwhite; }

.photo-frame-tile { position: relative; }
.photo-frame-likes {
  position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px;
  background: rgba(12, 9, 15, .72); color: floralwhite; font-size: 11px; font-weight: 700;
}
.photo-frame-likes i { color: #c5becb; }
.photo-frame-likes.is-liked i { color: #e9657b; }
.photo-frame-grid-flat { margin-bottom: 18px; }
.photo-frame-cell { min-width: 0; }
.photo-frame-source {
  display: block; margin: 4px 2px 0; color: #e9657b; font-size: 12px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none;
}
.photo-frame-source:hover { text-decoration: underline; }

/* ---- Toolbar, orientation filter, mixed tiles (2026-12-02) ---- */
.photo-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 16px; }
.photo-toolbar .photo-sort { margin: 0; }
.photo-orientation { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid rgba(166, 172, 130, .35); }
.photo-orientation-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 7px;
  color: #d9d1dc; font-size: 12px; font-weight: 600; text-decoration: none;
}
.photo-orientation-link:hover { color: floralwhite; background: rgba(255, 255, 255, .06); }
.photo-orientation-link.is-current { background: var(--sage, #a6ac82); color: #17131c; }
.photos-toolbar .photo-orientation { margin-left: auto; margin-right: 10px; }
.photos-toolbar .model-photo-sort { margin: 0; }

.photo-frame-grid { align-items: start; }
.photo-frame-tile.is-portrait { aspect-ratio: 3 / 4; }
.photo-kind {
  position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 9, 15, .7); color: floralwhite; font-size: 10px;
}

/* ---- Infinite scroll switch, page badge, resume (2026-12-02) ---- */
.photo-infinite-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; padding: 7px 12px;
  border: 0; border-left: 1px solid rgba(255, 255, 255, .12); border-radius: 0 9px 9px 0;
  background: transparent; color: #d9d1dc; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.photo-infinite-toggle:hover { color: floralwhite; }
.photo-switch {
  position: relative; width: 30px; height: 17px; border-radius: 999px; background: rgba(255, 255, 255, .18);
  transition: background .15s ease;
}
.photo-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%;
  background: floralwhite; transition: transform .15s ease;
}
.photo-infinite-toggle.is-on { color: floralwhite; }
.photo-infinite-toggle.is-on .photo-switch { background: var(--sage, #a6ac82); }
.photo-infinite-toggle.is-on .photo-switch::after { transform: translateX(13px); }
.photo-infinite-toggle:focus-visible { outline: 2px solid var(--sage, #a6ac82); outline-offset: 2px; }

.photo-infinite-status { margin: 14px 0 24px; text-align: center; color: #c5becb; font-size: 13px; min-height: 1em; }
.photo-infinite-status[hidden], .photo-page-badge[hidden], .pagination[hidden], .photos-skip[hidden] { display: none !important; }
.photo-page-badge {
  position: fixed; left: 14px; bottom: 14px; z-index: 900; padding: 7px 13px; border-radius: 999px;
  background: rgba(23, 19, 28, .9); border: 1px solid rgba(166, 172, 130, .45);
  color: floralwhite; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.photo-resume-wrap { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.photo-resume {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  background: rgba(166, 172, 130, .16); border: 1px solid rgba(166, 172, 130, .5);
  color: floralwhite; font-size: 13px; font-weight: 600; text-decoration: none;
}
.photo-resume:hover { background: rgba(166, 172, 130, .28); }
.photo-resume-dismiss {
  width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #d9d1dc;
}
