/* Fresh Photos section rebuild — The 72 Club
   Deliberately scoped to #photos; gallery data and interactions stay in assets/gallery.js. */
#photos.tilak-photos-section {
  --pg-bg: #071426;
  --pg-panel: #0c2038;
  --pg-panel-2: #102a47;
  --pg-line: rgba(145, 190, 235, 0.2);
  --pg-text: #f2f7ff;
  --pg-muted: #a7bdd5;
  --pg-cyan: #70e4f5;
  --pg-orange: #ff8057;
  display: block !important;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: clamp(18px, 3vw, 38px) clamp(12px, 3.5vw, 48px) clamp(24px, 4vw, 44px) !important;
  overflow: visible;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(31, 107, 198, 0.2), transparent 34rem),
    radial-gradient(ellipse at 100% 24%, rgba(255, 128, 87, 0.08), transparent 28rem),
    linear-gradient(180deg, #071426, #081a2d 60%, #061222);
}
#photos.tilak-photos-section > .section-heading {
  display: none !important;
}
#photos.tilak-photos-section > .cricinfo-gallery {
  display: block !important;
  position: relative;
  box-sizing: border-box;
  width: min(100%, 1440px) !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: clamp(14px, 2.2vw, 28px) !important;
  overflow: visible;
  border: 1px solid var(--pg-line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(12, 32, 56, 0.98), rgba(6, 20, 36, 0.98));
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
#photos .cricinfo-gallery::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 90px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--pg-orange), var(--pg-cyan));
}
#photos .gallery-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 20px;
  padding: 4px 0 18px;
  border-bottom: 1px solid rgba(145, 190, 235, 0.14);
}
#photos .gallery-heading .eyebrow {
  color: var(--pg-cyan);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
}
#photos .gallery-heading h3 {
  margin: 7px 0 0;
  color: var(--pg-text);
  font-size: clamp(25px, 3.7vw, 42px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}
#photos .gallery-heading h3 em {
  color: var(--pg-orange);
  font-style: normal;
}
#photos #cricinfo-gallery-updated {
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(112, 228, 245, 0.2);
  border-radius: 999px;
  background: rgba(112, 228, 245, 0.06);
  color: var(--pg-muted);
  font-size: 11px;
  line-height: 1.45;
}
#photos #cricinfo-photo-grid {
  display: block !important;
  position: relative;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
#photos .tv-gallery-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  align-items: end;
  gap: 16px;
  margin: 0 0 18px !important;
  padding: 15px;
  border: 1px solid rgba(145, 190, 235, 0.16);
  border-radius: 15px;
  background: rgba(4, 16, 30, 0.56);
}
#photos .tv-gallery-toolbar-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
#photos .tv-gallery-toolbar-copy .eyebrow {
  color: var(--pg-cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.14em;
}
#photos .tv-gallery-toolbar-copy strong {
  color: var(--pg-text);
  font-size: 16px;
  line-height: 1.25;
}
#photos .tv-gallery-toolbar-copy small,
#photos .tv-gallery-sort-note {
  color: var(--pg-muted);
  font-size: 11px;
  line-height: 1.5;
}
#photos .tv-gallery-sort-note {
  margin-top: 1px;
}
#photos .tv-gallery-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 9px;
  min-width: 0;
}
#photos .tv-gallery-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#photos .tv-gallery-filters label > span {
  color: var(--pg-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
#photos .tv-gallery-filters select,
#photos .tv-gallery-clear,
#photos .tv-gallery-more {
  box-sizing: border-box;
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(145, 190, 235, 0.22);
  border-radius: 10px;
  background: #0b1c30;
  color: var(--pg-text);
  font-size: 12px;
}
#photos .tv-gallery-filters select {
  width: 100%;
  padding: 0 9px;
}
#photos .tv-gallery-clear {
  padding: 0 13px;
  cursor: pointer;
}
#photos .tv-gallery-clear:disabled {
  opacity: 0.42;
  cursor: default;
}
#photos .tv-album-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-content: start;
  gap: 14px;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
#photos .tv-album-card {
  display: flex;
  flex-direction: column;
  align-self: start;
  min-width: 0;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(145, 190, 235, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, #102741, #091a2e);
  color: var(--pg-text);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
#photos .tv-album-card:hover,
#photos .tv-album-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(112, 228, 245, 0.55);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}
#photos .tv-album-cover {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0b1d31;
}
#photos .tv-album-cover::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(2, 9, 18, 0.8));
}
#photos .tv-album-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.35s ease;
}
#photos .tv-album-card:hover .tv-album-cover img {
  transform: scale(1.045);
}
#photos .tv-album-count,
#photos .tv-album-open {
  position: absolute;
  z-index: 1;
  color: #fff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
}
#photos .tv-album-count {
  top: 9px;
  left: 9px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(3, 12, 23, 0.72);
  backdrop-filter: blur(8px);
}
#photos .tv-album-open {
  right: 10px;
  bottom: 10px;
}
#photos .tv-album-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}
#photos .tv-album-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--pg-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
#photos .tv-album-info small {
  color: var(--pg-muted);
  font-size: 10px;
  line-height: 1.4;
}
#photos .tv-gallery-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 0 4px;
}
#photos .tv-gallery-more-wrap p,
#photos .tv-gallery-end-note {
  margin: 16px 0 0;
  color: var(--pg-muted);
  text-align: center;
  font-size: 11px;
}
#photos .tv-gallery-more {
  padding: 0 20px;
  border-color: rgba(112, 228, 245, 0.36);
  background: linear-gradient(100deg, rgba(22, 83, 133, 0.75), rgba(10, 42, 68, 0.9));
  font-weight: 800;
  cursor: pointer;
}
#photos .tv-gallery-more:hover {
  border-color: var(--pg-cyan);
}
#photos .bcci-photo-empty {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--pg-line);
  border-radius: 14px;
  background: rgba(4, 16, 30, 0.55);
  color: var(--pg-text);
}
#photos .bcci-photo-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pg-orange), #e9485f);
  color: #fff;
  font-weight: 950;
}
#photos .bcci-photo-empty strong {
  font-size: 14px;
}
#photos .bcci-photo-empty p {
  margin: 5px 0 0;
  color: var(--pg-muted);
  font-size: 12px;
}
#photos .bcci-photo-empty a {
  display: inline-block;
  margin-top: 10px;
  color: var(--pg-cyan);
  font-size: 12px;
}
#photos .gallery-attribution {
  margin: 18px 0 0;
  color: #7893af;
  text-align: center;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}
#photos .tv-album-view-active .cricinfo-gallery {
  display: block;
}
@media (min-width: 1100px) {
  #photos .tv-album-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 16px;
  }
}
@media (max-width: 900px) {
  #photos .tv-gallery-toolbar {
    grid-template-columns: 1fr;
  }
  #photos .tv-gallery-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  }
  #photos .tv-album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 11px;
  }
}
@media (max-width: 600px) {
  #photos.tilak-photos-section {
    padding: 12px 10px 22px !important;
  }
  #photos.tilak-photos-section > .cricinfo-gallery {
    padding: 14px 11px !important;
    border-radius: 16px;
  }
  #photos .gallery-heading {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 14px;
  }
  #photos .gallery-heading h3 {
    font-size: 26px;
  }
  #photos #cricinfo-gallery-updated {
    font-size: 10px;
    padding: 6px 8px;
  }
  #photos .tv-gallery-toolbar {
    gap: 12px;
    padding: 11px;
    margin-bottom: 12px !important;
  }
  #photos .tv-gallery-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  #photos .tv-gallery-filters label > span {
    font-size: 9px;
  }
  #photos .tv-gallery-filters select {
    min-height: 42px;
    font-size: 12px;
  }
  #photos .tv-gallery-clear {
    min-height: 42px;
  }
  #photos .tv-album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px;
  }
  #photos .tv-album-cover {
    aspect-ratio: 3 / 4;
  }
  #photos .tv-album-count {
    top: 7px;
    left: 7px;
    padding: 5px 6px;
    font-size: 8px;
  }
  #photos .tv-album-open {
    right: 7px;
    bottom: 8px;
    font-size: 8px;
  }
  #photos .tv-album-info {
    padding: 9px;
    gap: 5px;
  }
  #photos .tv-album-info strong {
    font-size: 12px;
  }
  #photos .tv-album-info small {
    font-size: 9px;
  }
  #photos .gallery-attribution {
    line-height: 1.6;
  }
}
@media (max-width: 360px) {
  #photos .tv-album-grid {
    grid-template-columns: 1fr !important;
  }
  #photos .tv-album-cover {
    aspect-ratio: 16 / 10;
  }
}
@media (prefers-reduced-motion: reduce) {
  #photos .tv-album-card,
  #photos .tv-album-cover img {
    transition: none;
  }
}

/* Hard reset legacy section pseudo-elements: they were creating the giant empty block. */
#photos.tilak-photos-section::before,
#photos.tilak-photos-section::after {
  content: none !important;
  display: none !important;
  position: absolute !important;
  inset: auto !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#photos.tilak-photos-section > .cricinfo-gallery > .gallery-heading {
  display: flex !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  transform: none !important;
}
#photos.tilak-photos-section > .cricinfo-gallery,
#photos.tilak-photos-section > .cricinfo-gallery > .gallery-heading,
#photos.tilak-photos-section #cricinfo-photo-grid,
#photos.tilak-photos-section .tv-gallery-toolbar,
#photos.tilak-photos-section .tv-album-grid {
  inset-block-start: auto !important;
}

/* Fix verified in DevTools: legacy absolute-position rules stretch the toolbar to ~435px. */
#photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-rows: auto !important;
  align-content: start !important;
  align-items: start !important;
  justify-content: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
}
#photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar > * {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  float: none !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
}
#photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar .tv-gallery-toolbar-copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
#photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar .tv-gallery-filters {
  position: static !important;
  display: grid !important;
  align-self: start !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Final compact-layout guard: defeat legacy full-height/flex/grid rules in the Photos section. */
html body main#main-content > #photos.tilak-photos-section,
html body main > #photos.tilak-photos-section {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding-block: 24px !important;
  margin-block: 0 !important;
  align-items: initial !important;
  align-content: start !important;
  justify-content: initial !important;
  gap: 0 !important;
  grid-template-rows: none !important;
}
html body main > #photos.tilak-photos-section > .cricinfo-gallery {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  float: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto !important;
  transform: none !important;
  align-self: auto !important;
}
html body main > #photos.tilak-photos-section #cricinfo-photo-grid {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar {
  display: grid !important;
  position: relative !important;
  inset: auto !important;
  height: fit-content !important;
  min-height: 0 !important;
  max-height: none !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) !important;
  grid-template-rows: auto auto !important;
  align-content: start !important;
  align-items: start !important;
  gap: 14px !important;
  margin: 0 0 16px !important;
  padding: 14px !important;
  overflow: visible !important;
  transform: none !important;
}
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar > *,
html
  body
  main
  > #photos.tilak-photos-section
  #cricinfo-photo-grid
  > .tv-gallery-toolbar
  .tv-gallery-toolbar-copy,
html
  body
  main
  > #photos.tilak-photos-section
  #cricinfo-photo-grid
  > .tv-gallery-toolbar
  .tv-gallery-filters {
  position: static !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  transform: none !important;
  align-self: start !important;
}
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-album-grid {
  display: grid !important;
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-content: start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
@media (max-width: 760px) {
  html body main > #photos.tilak-photos-section {
    padding-block: 14px !important;
  }
  html body main > #photos.tilak-photos-section > .cricinfo-gallery {
    padding: 12px !important;
  }
  html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 12px !important;
  }
  html
    body
    main
    > #photos.tilak-photos-section
    #cricinfo-photo-grid
    > .tv-gallery-toolbar
    .tv-gallery-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 420px) {
  html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-album-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* 2026-10-12 mobile blank-space fix: keep the archive toolbar content-sized. */
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar {
  display: grid !important;
  grid-template-rows: min-content min-content !important;
  grid-auto-rows: min-content !important;
  align-content: start !important;
  align-items: start !important;
  justify-content: stretch !important;
  height: max-content !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  contain: none !important;
}
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar > *,
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar .tv-gallery-toolbar-copy,
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar .tv-gallery-filters,
html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar .tv-gallery-filters > label {
  height: max-content !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: start !important;
  align-content: start !important;
  grid-row: auto !important;
}
@media (max-width: 760px) {
  html body main > #photos.tilak-photos-section #cricinfo-photo-grid > .tv-gallery-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: min-content min-content !important;
    grid-auto-rows: min-content !important;
    gap: 12px !important;
    padding: 12px !important;
  }
}
