/* ============================================================
   GNB Multiple Photos — Redesigned UI (GNB Visual Framework)
   ============================================================ */

/* ── Section Header ── */
.media-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.media-section-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f1f1c;
  font-family: 'Poppins', sans-serif;
}
.media-section-header .sparkle-icon {
  color: #5BA04A;
  flex-shrink: 0;
}
.media-section-badge {
  display: inline-block;
  background: #EAF4E7;
  color: #447C37;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: auto;
  letter-spacing: .03em;
}

/* ── Media Tabs ── */
.step4-media-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.step4-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #77766F;
  transition: all .2s;
}
.step4-tab-btn:hover {
  border-color: #dadada;
}
.step4-tab-btn.active {
  background: #EAF4E7;
  border-color: #5BA04A;
  color: #447C37;
  font-weight: 600;
}
.step4-tab-btn svg { flex-shrink: 0; }

/* ── Upload Card ── */
.upload-card {
  border: 2px dashed rgba(91,160,74,.35);
  border-radius: 16px;
  background: linear-gradient(135deg, #f8faf7, #eef5eb);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.upload-card:hover,
.upload-card:focus-within {
  border-color: #5BA04A;
  box-shadow: 0 0 0 4px rgba(91,160,74,.08);
}
.upload-card-illustration {
  margin-bottom: 14px;
  color: #5BA04A;
  opacity: .7;
}
.upload-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1f1f1c;
  margin-bottom: 10px;
}
.upload-card-btn {
  display: inline-block;
  background: #5BA04A;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.upload-card-btn:hover { background: #447C37; }
.upload-card-sub {
  font-size: 13px;
  color: #77766F;
  margin-top: 8px;
}
.upload-card-sub .browse-link {
  color: #5BA04A;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}
.upload-card-rules {
  font-size: 11px;
  color: #9a9892;
  margin-top: 12px;
}

/* ── Photos Section ── */
.photos-section {
  margin-top: 20px;
}
.photos-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.photos-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1c;
}
.photos-section-count {
  font-size: 13px;
  color: #5BA04A;
  font-weight: 500;
}
.photos-section-hint {
  margin-left: auto;
  font-size: 12px;
  color: #9a9892;
}

/* ── Photo Grid ── */
.photo-sortable-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 50px;
}

/* ── Thumbnail ── */
.photo-thumbnail {
  width: 160px;
  height: 120px;
  border-radius: 12px;
  border: 2px solid #dadada;
  background: #f7f7f5;
  position: relative;
  overflow: hidden;
  cursor: grab;
  flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.photo-thumbnail:active { cursor: grabbing; }
.photo-thumbnail:hover {
  border-color: #5BA04A;
  box-shadow: 0 4px 14px rgba(91,160,74,.15);
}
.photo-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Cover state */
.photo-thumbnail.photo-cover {
  border-color: #5BA04A;
  border-width: 3px;
  box-shadow: 0 0 0 4px rgba(91,160,74,.15);
}

/* Drag handle */
.photo-drag-handle {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: grab;
  z-index: 2;
}
.photo-drag-handle span {
  display: block;
  width: 10px;
  height: 2px;
  background: rgba(255,255,255,.9);
  border-radius: 1px;
}

/* Number badge */
.photo-number {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  z-index: 2;
}

/* Cover badge */
.photo-cover-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: #5BA04A;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  z-index: 3;
}

/* Action buttons */
.photo-controls {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  z-index: 2;
}
.photo-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #3f3f3a;
  transition: background .15s, color .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.photo-btn:hover { background: #5BA04A; color: #fff; }
.photo-btn.photo-btn-delete:hover { background: #d32f2f; color: #fff; }

/* Cover note */
.cover-note {
  font-size: 12px;
  color: #9a9892;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cover-note .info-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #EAF4E7;
  color: #5BA04A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* Placeholder */
.photo-placeholder {
  width: 160px;
  height: 120px;
  border-radius: 12px;
  border: 2px dashed #5BA04A;
  background: rgba(91,160,74,.06);
  flex-shrink: 0;
}

/* Photo count indicator */
.photo-count-indicator {
  margin-top: 8px;
  font-size: 12px;
  color: #77766F;
}
.photo-count-indicator span { font-weight: 600; color: #5BA04A; }

/* ── Croppie Modal ── */
.crop-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-modal {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.crop-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  color: #1f1f1c;
}
.crop-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.crop-modal-actions button {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.crop-btn-cancel { background: #f0f0f0; color: #3f3f3a; }
.crop-btn-confirm { background: #5BA04A; color: #fff; }

/* ============================================================
   Card Preview — Multi-Photo Indicator
   ============================================================ */
.photo-count-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
  line-height: 1;
  font-family: 'Poppins', system-ui, sans-serif;
}
.card-image.has-multiple-photos, .notice-image.has-multiple-photos { position: relative; }
.card-image.has-multiple-photos::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
  animation: multiPhotoIndicator 4s ease-in-out infinite;
}
@keyframes multiPhotoIndicator {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
  50% { box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
}
.card-image-slides { position: relative; width: 100%; height: 100%; }
.card-image-slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 1s ease;
}

/* ============================================================
   Swiper Gallery — Detail Page
   ============================================================ */
.notice-detail-swiper {
  width: 100%;
  height: 500px;
  max-height: 70vh;
  background: #1a1a1a;
}
.notice-detail-swiper .swiper-wrapper { height: 100%; }
.notice-detail-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100% !important;
}
.notice-detail-swiper .swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
@media (max-width: 767px) {
  .notice-detail-swiper { height: 320px; max-height: 50vh; }
}
.notice-detail-swiper .swiper-button-next,
.notice-detail-swiper .swiper-button-prev {
  color: #fff;
  background: rgba(0,0,0,.35);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: background .2s;
}
.notice-detail-swiper .swiper-button-next:hover,
.notice-detail-swiper .swiper-button-prev:hover { background: rgba(91,160,74,.75); }
.notice-detail-swiper .swiper-button-next::after,
.notice-detail-swiper .swiper-button-prev::after { font-size: 18px; font-weight: 700; }
.notice-detail-swiper .swiper-pagination-bullet { background: #fff; opacity: .6; }
.notice-detail-swiper .swiper-pagination-bullet-active { background: #5BA04A; opacity: 1; }

/* ============================================================
   Thumbnail Strip — Detail Gallery
   ============================================================ */
.notice-detail-thumbs { margin-top: 10px; padding: 0 4px; }
.notice-detail-thumbs .swiper-slide {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity .2s, border-color .2s;
  height: auto !important;
  width: auto !important;
}
.notice-detail-thumbs .swiper-slide-thumb-active { opacity: 1; border-color: #5BA04A; }
.notice-detail-thumbs .thumb-img { width: 100%; height: 60px; object-fit: cover; display: block; }
.notice-detail-counter {
  text-align: center;
  font-size: 13px;
  color: #77766F;
  margin-top: 8px;
  font-weight: 500;
}
.notice-detail-counter span { color: #1f1f1c; font-weight: 600; }
a.notice-detail-author.author-swiper { bottom: 110px; z-index: 3; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card-image.has-multiple-photos::after { animation: none; box-shadow: none; }
  .card-image-slides img { transition: none; }
}
