/* Belle Trouvé — Smart Alternatives: Choose from Favorites (Session 72)
   The outlined button under "Choose a Photo", and the photo grid inside the favorites picker
   (the picker itself reuses the .bt-sheet dialog styles in styles.css). */

.alt-choose-fav {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 0;
  padding: 11px 22px;
  border-radius: 12px;
  border: 1px solid rgba(201, 168, 76, 0.6);
  color: var(--gold-text);
  font-size: 14px; font-weight: 600;
  transition: border-color .15s ease, background-color .15s ease;
}
.alt-choose-fav svg { width: 18px; height: 18px; flex: 0 0 18px; }
@media (hover: hover) {
  .alt-choose-fav:hover { border-color: var(--gold); background: rgba(201, 168, 76, 0.08); }
}
.alt-idle .alt-choose { display: inline-flex; }
.alt-idle .alt-choose-fav { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

/* Photo grid in the picker */
.alt-fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 4px 2px 8px;
}
.alt-fav-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(201, 168, 76, 0.3);
  transition: border-color .15s ease, transform .15s ease;
}
:root[data-theme="light"] .alt-fav-thumb { border-color: rgba(10, 17, 40, 0.12); }
.alt-fav-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alt-fav-thumb.img-failed img { visibility: hidden; }
.alt-fav-thumb.skeleton {
  animation: shimmer 1.4s linear infinite;
  background: linear-gradient(90deg, var(--skeleton-a), var(--skeleton-b), var(--skeleton-a));
  background-size: 200% 100%;
}
@media (hover: hover) {
  .alt-fav-thumb:not(.skeleton):hover { border-color: var(--gold); transform: translateY(-1px); }
}
.alt-fav-thumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.alt-fav-empty { padding: 18px 8px 22px; line-height: 1.55; }

@media (min-width: 768px) {
  .alt-fav-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); max-height: 56vh; }
}
@media (prefers-reduced-motion: reduce) {
  .alt-choose-fav, .alt-fav-thumb { transition: none; }
  .alt-fav-thumb.skeleton { animation: none; }
  .alt-fav-thumb:not(.skeleton):hover { transform: none; }
}
