/* ===========================================================
   Gallery
   =========================================================== */

/* ==========================================
   Gallery Search
   ========================================== */

#fraGalleryFilters {
  display: flex;
  align-items: center;
  gap: 20px;

  margin: 16px 0 20px 0;
  padding: 12px 16px;

  border: 1px solid #d8d8d8;
  border-radius: 8px;

  background: #fafafa;
}

#fraGallerySearchPrompt {
  flex: 0 0 24%;

  font-size: 0.95rem;
  line-height: 1.35;
}

#fraGallerySearch {
  flex: 1;
}

#fraGallerySearchButtons {
  display: flex;
  gap: 8px;
}

#txtGallerySearch {
  width: 100%;
  padding: 8px 10px;

  font-size: 1rem;
}

#btnGallerySearch,
#btnGalleryClear {
  min-width: 70px;
  padding: 6px 12px;

  font-size: 0.95rem;
  font-weight: 600;
}

#fraGalleryViewing {
  white-space: nowrap;

  font-size: 1rem;
  font-weight: 600;
}

#fraGalleryPaging {
  display: flex;
  gap: 8px;
}

#fraGalleryPaging button {
  min-width: 70px;
}

/* ===========================================================
   Bottom Area
   =========================================================== */

#fraGalleryBottom {
  display: flex;
  gap: 24px;

  align-items: stretch;
}

/* ===========================================================
   Gallery Cards
   =========================================================== */

#fraGalleryCards {
  flex: 1;
  position: relative;
  overflow: auto;
  border: 1px solid #bdbdbd;
  background: white;
  box-sizing: border-box;
}

/* ===========================================================
   Gallery Detail
   =========================================================== */

#fraGalleryDetail {
  width: 320px;

  display: flex;
  flex-direction: column;

  gap: 12px;

  flex-shrink: 0;

  overflow: hidden;
}

/* ===========================================================
   Selected Design
   =========================================================== */

#galleryDetailContent {
  flex: 1;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 18px;

  border: 1px solid #bdbdbd;

  background: white;

  box-sizing: border-box;
}

#galleryDetailContent h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

/* ===========================================================
   Gallery Buttons
   =========================================================== */

#galleryButtons {
  display: flex;
  flex-direction: column;

  gap: 12px;

  flex: 0 0 auto;
}

#galleryButtons button {
  width: 100%;

  padding: 10px;
}

/* ===========================================================
   Gallery Card (temporary development appearance)
   =========================================================== */

.galleryCard {
  position: absolute;

  display: flex;
  flex-direction: column;

  box-sizing: border-box;

  border: 2px solid #3b82f6;
  background: #f8fbff;

  overflow: hidden;

  user-select: none;
}

.galleryCardEmpty {
  border: none;
  background: transparent;
}

.galleryCardDirect {
  background: #7fd67f; /* obvious green */
}

.galleryCardTransform {
  background: #ffe55c; /* obvious yellow */
}

/* ===========================================================
   Selected Gallery Card
   =========================================================== */

.galleryCardSelected {
  border: 4px solid #2563eb;

  box-shadow: 0 0 8px rgba(37, 99, 235, 0.35);

  z-index: 10;
}

.galleryCardImage {
  width: 100%;
  height: calc(100% - 40px);

  overflow: hidden;
}

.galleryCardImage img {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

.galleryCardTitle {
  height: 40px;

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;
  font-weight: 600;

  padding: 4px;
}
