/* activities/photo.php — social-style photo picker (loaded only on this page) */

body.page-photo .photo-pick {
  display: block;
  margin: 0 0 0.95rem;
}

body.page-photo .photo-pick .photo-field__label {
  display: block;
  margin-bottom: 0.45rem;
  color: #1e3a8a;
  font-size: 0.88rem;
  font-weight: 750;
}

body.page-photo .photo-pick__drop {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 11.5rem;
  margin: 0;
  padding: 0;
  border: 1.5px dashed rgba(37, 99, 235, 0.35);
  border-radius: 22px;
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

body.page-photo .photo-pick__drop:hover {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

body.page-photo .photo-pick__drop:focus-within {
  border-color: #2563eb;
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

body.page-photo .photo-pick__drop.is-filled {
  border-style: solid;
  border-color: rgba(8, 38, 83, 0.12);
  background: #0f172a;
  min-height: 14rem;
}

body.page-photo .photo-pick__drop.is-filled:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

body.page-photo .photo-pick__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  z-index: 3;
}

body.page-photo .photo-pick__idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 11.5rem;
  padding: 1.35rem 1.1rem;
  text-align: center;
  pointer-events: none;
}

body.page-photo .photo-pick__icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1.15rem;
  background: linear-gradient(160deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow:
    0 10px 22px rgba(37, 99, 235, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body.page-photo .photo-pick__title {
  color: #0f274f;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

body.page-photo .photo-pick__sub {
  max-width: 18rem;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.45;
}

body.page-photo .photo-pick__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 750;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

body.page-photo .photo-pick__preview {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

body.page-photo .photo-pick__preview[hidden] {
  display: none !important;
}

body.page-photo .photo-pick__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-photo .photo-pick__change {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  body.page-photo .photo-pick__drop {
    transition: none;
  }
  body.page-photo .photo-pick__drop:hover {
    transform: none;
  }
}


body.page-photo .photo-pick__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
body.page-photo .photo-pick__label-row .photo-field__label {
  margin-bottom: 0;
}
body.page-photo .photo-pick__quota {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}
body.page-photo .photo-pick__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}
body.page-photo .photo-pick__thumbs[hidden] {
  display: none !important;
}
body.page-photo .photo-pick__thumb {
  margin: 0;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(8, 38, 83, 0.1);
  background: #0f172a;
}
body.page-photo .photo-pick__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.page-photo .photo-pick__live-err,
body.page-photo .photo-field__live-err {
  margin: 0.45rem 0 0;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 650;
}
body.page-photo .photo-pick__live-err[hidden],
body.page-photo .photo-field__live-err[hidden] {
  display: none !important;
}
body.page-photo .photo-field__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
body.page-photo .photo-field__count {
  margin: 0;
  margin-left: auto;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}
body.page-photo .photo-field__count.is-low {
  color: #c2410c;
}
body.page-photo .photo-input.is-invalid {
  border-color: #dc2626;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
body.page-photo .photo-pick__drop.is-filled {
  min-height: 7.5rem;
}


/* quota alert spacing under stat cards */
body.page-photo .photo-panel__head + .photo-alert.is-soft {
  margin-top: 1.15rem;
}

/* processing overlay */
body.page-photo.is-photo-processing {
  overflow: hidden;
}
body.page-photo .photo-process {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}
body.page-photo .photo-process[hidden] {
  display: none !important;
}
body.page-photo .photo-process__card {
  width: min(100%, 22.5rem);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  padding: 1.45rem 1.25rem 1.2rem;
  text-align: center;
}
body.page-photo .photo-process__pulse {
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 auto 0.9rem;
  border-radius: 999px;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  animation: photo-spin 0.9s linear infinite;
}
@keyframes photo-spin {
  to { transform: rotate(360deg); }
}
body.page-photo .photo-process__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #082653;
}
body.page-photo .photo-process__text {
  margin: 0.55rem 0 0;
  color: #52698a;
  font-size: 0.9rem;
  line-height: 1.5;
}
body.page-photo .photo-process__cancel {
  margin-top: 1rem;
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(8, 38, 83, 0.12);
  background: #fff;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
body.page-photo .photo-process__cancel:hover {
  background: #f8fafc;
}
body.page-photo .photo-process__cancel[hidden] {
  display: none !important;
}


/* guest login CTA */
body.page-photo .photo-points-pill--login {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  font-weight: 750;
  font-size: 0.86rem;
}
body.page-photo .photo-login-card {
  margin-top: 1rem;
  padding: 1.15rem 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  text-align: center;
}
body.page-photo .photo-login-card__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: #082653;
}
body.page-photo .photo-login-card__text {
  margin: 0.45rem 0 0.95rem;
  color: #52698a;
  font-size: 0.9rem;
  line-height: 1.5;
}
body.page-photo .photo-login-card .photo-primary-button {
  display: inline-flex;
  width: auto;
  min-width: min(100%, 16rem);
  justify-content: center;
}
body.page-photo a.photo-thumb--lb,
body.page-photo a.photo-thumb__hit {
  display: block;
  color: inherit;
  text-decoration: none;
}
body.page-photo a.photo-thumb--lb img,
body.page-photo a.photo-thumb__hit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Topic facepile — before CTA, not cover */
body.page-photo .photo-facepile,
body.page-photo .photo-facepile--inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0;
  width: auto;
  max-width: 100%;
  margin: .55rem 0 .35rem;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
body.page-photo .photo-facepile__img {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #fff;
  margin-left: -.45rem;
  background: #dbeafe;
  box-shadow: 0 2px 8px rgba(15,23,42,.12);
  flex: 0 0 auto;
}
body.page-photo .photo-facepile__img:first-child { margin-left: 0; }
body.page-photo .photo-facepile__img.is-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  color: #1d4ed8;
}
body.page-photo .photo-facepile__more {
  margin-left: .35rem;
  font-size: .78rem;
  font-weight: 800;
  color: #082653;
  white-space: nowrap;
}
body.page-photo .photo-topic-card__cta {
  display: inline-block;
  margin-top: .15rem;
}

/* Bound product card on topic detail */
body.page-photo .photo-product {
  margin: 1.15rem 0 1.35rem;
}
body.page-photo .photo-product__grid {
  max-width: 22rem;
}
body.page-photo .photo-product__grid .shop-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}
body.page-photo .photo-product__grid .shop-card {
  max-width: 22rem;
}

/* Detail joiners — single row, no wrap overflow */
body.page-photo .photo-panel__status-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: nowrap;
  min-width: 0;
}
body.page-photo .photo-joiners {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  gap: 0;
}
body.page-photo .photo-joiners__img {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #fff;
  margin-left: -.4rem;
  background: #dbeafe;
  flex: 0 0 auto;
}
body.page-photo .photo-joiners__img:first-child { margin-left: 0; }
body.page-photo .photo-joiners__img.is-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 800;
  color: #1d4ed8;
}
/* Hide overflow avatars by max-count via CSS container queries / media */
@media (max-width: 360px) {
  body.page-photo .photo-joiners__img:nth-child(n+5) { display: none; }
}
@media (min-width: 361px) and (max-width: 520px) {
  body.page-photo .photo-joiners__img:nth-child(n+7) { display: none; }
}
@media (min-width: 521px) and (max-width: 900px) {
  body.page-photo .photo-joiners__img:nth-child(n+10) { display: none; }
}
@media (min-width: 901px) {
  body.page-photo .photo-joiners__img:nth-child(n+14) { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  body.page-photo .photo-joiners__img:nth-child(n+8) { display: none; }
}

/* Gallery social cards */
body.page-photo .photo-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .95rem;
}
@media (min-width: 720px) {
  body.page-photo .photo-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* PDP: mobile 3 / desktop 6, max 6 items from PHP */
.pdp-photo-gallery .photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
@media (min-width: 900px) {
  .pdp-photo-gallery .photo-gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
  }
}
.pdp-photo-gallery .photo-gallery-card__caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pdp-photo-gallery .photo-gallery-card__body {
  padding: .55rem .55rem .65rem;
}
.pdp-photo-gallery .photo-gallery-card__name {
  font-size: .78rem;
}
.pdp-photo-gallery .photo-gallery-card__date {
  font-size: .62rem;
}
body.page-photo .photo-gallery-card,
.pdp-photo-gallery .photo-gallery-card {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(8,38,83,.08);
  box-shadow: 0 10px 28px rgba(35,82,140,.08);
}
body.page-photo .photo-gallery-card__media,
.pdp-photo-gallery .photo-gallery-card__media {
  position: relative;
  background: #0f172a;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
}
body.page-photo .photo-gallery-card__media img,
.pdp-photo-gallery .photo-gallery-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0; /* no bottom round on preview */
}
body.page-photo .photo-gallery-card__hit,
.pdp-photo-gallery .photo-gallery-card__hit { display: block; }
body.page-photo .photo-gallery-card__points,
.pdp-photo-gallery .photo-gallery-card__points {
  position: absolute;
  right: .65rem;
  bottom: .65rem;
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: rgba(15,23,42,.55);
  color: #f8fafc;
  font-size: .78rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
body.page-photo .photo-gallery-card__p,
.pdp-photo-gallery .photo-gallery-card__p {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(145deg, #f6e27a, #d4a017);
  color: #5b3b00;
  font-size: .68rem;
  font-weight: 900;
}
body.page-photo .photo-gallery-card__body,
.pdp-photo-gallery .photo-gallery-card__body {
  padding: .75rem .85rem .9rem;
}
body.page-photo .photo-gallery-card__author,
.pdp-photo-gallery .photo-gallery-card__author {
  display: flex;
  align-items: center;
  gap: .55rem;
}
body.page-photo .photo-gallery-card__avatar,
.pdp-photo-gallery .photo-gallery-card__avatar {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  object-fit: cover;
  background: #dbeafe;
  flex: 0 0 auto;
}
body.page-photo .photo-gallery-card__avatar.is-empty,
.pdp-photo-gallery .photo-gallery-card__avatar.is-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  color: #1d4ed8;
}
body.page-photo .photo-gallery-card__who,
.pdp-photo-gallery .photo-gallery-card__who { min-width: 0; }
body.page-photo .photo-gallery-card__name,
.pdp-photo-gallery .photo-gallery-card__name {
  display: block;
  font-size: .92rem;
  font-weight: 800;
  color: #082653;
  line-height: 1.2;
}
body.page-photo .photo-gallery-card__date,
.pdp-photo-gallery .photo-gallery-card__date {
  display: block;
  margin-top: .12rem;
  font-size: .68rem;
  font-weight: 600;
  color: #94a3b8;
}
body.page-photo .photo-gallery-card__caption,
.pdp-photo-gallery .photo-gallery-card__caption {
  margin: .55rem 0 0;
  color: #475569;
  font-size: .88rem;
  line-height: 1.45;
}
body.page-photo .photo-section--previous {
  margin-top: 1.75rem;
}


/* PDP product-bound photo gallery */
.pdp-photo-gallery {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(8, 38, 83, 0.08);
}
.pdp-photo-gallery__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}
.pdp-photo-gallery__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #082653;
}
.pdp-photo-gallery__chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  font-size: .75rem;
  font-weight: 700;
}
.pdp-photo-gallery__more {
  margin: .85rem 0 0;
  font-size: .88rem;
}
.pdp-photo-gallery__more a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}
.pdp-photo-gallery__more a:hover { text-decoration: underline; }


/* Account photo page — tabs + cards not crushed */
body.page-account-photo .account-app .aa-seg__item {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.55rem 0.45rem 0.7rem;
  font-size: 0.82rem;
  white-space: nowrap;
}
