/* ==========================================================================
   Smart Live QR & Selfie Matcher Gallery Styles
   ========================================================================== */

.gallery-hero-header {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 60%, #fed7aa 100%);
  padding: 50px 0 35px;
  text-align: center;
  border-bottom: 2px solid var(--primary-gold);
}

/* Day Filter Navigation Bar */
.gallery-day-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
}

.day-filter-btn {
  background: #ffffff;
  border: 1px solid rgba(217, 119, 6, 0.3);
  padding: 8px 18px;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--royal-maroon);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.day-filter-btn:hover {
  border-color: var(--primary-gold);
  background: var(--cream-soft);
  transform: translateY(-2px);
}

.day-filter-btn.active {
  background: var(--maroon-gradient);
  color: #fff;
  border-color: var(--royal-maroon);
  box-shadow: 0 4px 12px rgba(136, 19, 55, 0.3);
}

/* Smart Action Bar (Live QR + Selfie Search + Upload) */
.gallery-smart-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 35px;
}

.btn-smart-selfie {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  transition: var(--transition);
}

.btn-smart-selfie:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);
}

.btn-live-qr {
  background: var(--gold-gradient);
  color: var(--maroon-dark);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.3);
  transition: var(--transition);
}

.btn-live-qr:hover {
  transform: translateY(-2px);
  background: var(--saffron-gradient);
  color: #fff;
}

.btn-upload-photo {
  background: #ffffff;
  color: var(--royal-maroon);
  border: 2px solid var(--primary-gold);
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-upload-photo:hover {
  background: var(--cream-soft);
  transform: translateY(-2px);
}

/* Gallery Grid */
.katha-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.gallery-item-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.gallery-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sacred);
}

.gallery-thumb-wrap {
  position: relative;
  height: 220px;
  background-color: #f3f4f6;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item-card:hover .gallery-img {
  transform: scale(1.06);
}

.photo-day-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--maroon-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.photo-faces-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gallery-item-meta {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.photo-caption {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--royal-maroon);
  margin-bottom: 6px;
  line-height: 1.35;
}

.photo-time-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.photo-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.btn-download-icon {
  background: none;
  border: none;
  color: var(--primary-gold);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-download-icon:hover {
  color: var(--royal-maroon);
  transform: scale(1.15);
}

/* SMART SELFIE MODAL */
.smart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.smart-modal-overlay.active {
  display: flex;
}

.smart-modal-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 100%;
  border: 2px solid var(--primary-gold);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  background: var(--maroon-gradient);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-family: 'Rozha One', var(--font-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #fde68a;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-body {
  padding: 26px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Camera Live View Box */
.camera-view-container {
  width: 100%;
  max-width: 380px;
  height: 280px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--primary-gold);
  background: #111827;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-stream {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-guide-oval {
  position: absolute;
  width: 180px;
  height: 220px;
  border: 2px dashed rgba(251, 191, 36, 0.8);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.35);
}

/* Match Progress Indicator */
.matching-loader {
  display: none;
  text-align: center;
  padding: 24px 0;
}

.matching-loader.active {
  display: block;
}

.radar-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--cream-soft);
  border-top-color: var(--primary-gold);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Results Display Area */
.search-results-box {
  display: none;
}

.search-results-box.active {
  display: block;
}

.results-count-banner {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
}

/* Printable Poster / Standee Modal */
.standee-poster-wrap {
  background: #ffffff;
  border: 8px solid #d97706;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.standee-samiti-header {
  border-bottom: 2px solid #d97706;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.standee-samiti-header img {
  width: 100%;
  max-height: 70px;
  object-fit: contain;
}

.standee-headline {
  font-family: 'Rozha One', serif;
  font-size: 1.6rem;
  color: #881337;
  margin-bottom: 6px;
}

.standee-sub {
  font-size: 0.95rem;
  color: #ea580c;
  font-weight: 600;
  margin-bottom: 20px;
}

.standee-qr-code {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  border: 2px dashed #d97706;
  padding: 10px;
  border-radius: 12px;
}

.standee-instruction {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
}
