/* ==========================================================================
   GuestCam Widget — Parallax + iPhone Frame
   ========================================================================== */

/* ── Parallax Section ── */
.gc-parallax-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 80px 20px;
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-color: var(--wedding-dark);
  font-family: var(--wedding-font-sans);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.gc-parallax-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.gc-parallax-section > * {
  position: relative;
  z-index: 1;
}

/* ── Section Header ── */
.gc-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.gc-header-line {
  width: 50px;
  height: 3px;
  background: var(--wedding-primary-light);
  margin: 0 auto 20px;
  border-radius: 2px;
}

.gc-section-title {
  font-family: var(--wedding-font-cursive);
  font-size: 42px;
  color: #fff;
  margin: 0 0 10px;
  font-weight: 400;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.gc-section-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 0;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ══════════════════════════════════════
   iPhone Device Frame
   ══════════════════════════════════════ */
.gc-iphone-frame {
  width: 100%;
  max-width: 380px;
  margin: 0 auto 50px;
  perspective: 1200px;
}

.gc-iphone-body {
  background: #1a1a1a;
  border-radius: 48px;
  padding: 12px;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

/* Dynamic Island */
.gc-dynamic-island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-di-camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2d5a9e, #0a1628);
  border: 1.5px solid #1a3050;
  box-shadow: 0 0 4px rgba(45,90,158,0.4);
}

/* Status Bar */
.gc-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 28px;
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 600;
}

.gc-time { letter-spacing: 0.5px; }

.gc-status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.7);
}

.gc-status-icons svg { width: 16px; height: 12px; }

/* iPhone Screen */
.gc-iphone-screen {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(251,249,248,1) 100%);
  border-radius: 38px;
  padding: 50px 20px 16px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* App Header */
.gc-app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}

.gc-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--wedding-primary) 0%, var(--wedding-primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(140,106,92,0.3);
}

.gc-app-name {
  font-family: var(--wedding-font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--wedding-dark);
  display: block;
  line-height: 1.2;
}

.gc-app-badge {
  font-size: 11px;
  color: var(--wedding-primary);
  background: rgba(140,106,92,0.1);
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-block;
  margin-top: 2px;
}

/* ── Viewfinder ── */
.gc-viewfinder-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gc-viewfinder {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #f0ebe7 0%, #e4ddd7 100%);
  cursor: pointer;
}

.gc-vf-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  z-index: 2;
  border-color: var(--wedding-primary);
  border-style: solid;
  border-width: 0;
}

.gc-vf-tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; border-radius: 3px 0 0 0; }
.gc-vf-tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; border-radius: 0 3px 0 0; }
.gc-vf-bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; border-radius: 0 0 0 3px; }
.gc-vf-br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; border-radius: 0 0 3px 0; }

.gc-vf-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--wedding-primary-light);
  opacity: 0.5;
  transition: opacity 0.3s;
}

.gc-vf-placeholder span {
  font-size: 12px;
  font-weight: 500;
}

.gc-viewfinder:hover .gc-vf-placeholder { opacity: 0.9; }

.gc-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: 16px;
}

/* Shutter Button */
.gc-vf-shutter { display: flex; justify-content: center; }

.gc-shutter-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--wedding-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.gc-shutter-ring:hover { transform: scale(1.08); }
.gc-shutter-ring:active { transform: scale(0.95); }

.gc-shutter-inner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wedding-primary), var(--wedding-primary-light));
  transition: all 0.2s;
}

.gc-shutter-ring:hover .gc-shutter-inner {
  box-shadow: 0 0 16px rgba(140,106,92,0.5);
}

/* ── Wedding Text Overlay ── */
.gc-wedding-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 8px;
  gap: 2px;
  animation: gcOverlayFadeIn 0.6s ease forwards;
}

.gc-overlay-label {
  font-family: var(--wedding-font-cursive, 'Great Vibes', cursive);
  font-size: 16px;
  color: var(--wedding-primary, #8c6a5c);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.gc-overlay-names {
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--wedding-dark, #2c2523);
  letter-spacing: 1px;
  line-height: 1.3;
}

.gc-overlay-date {
  font-family: var(--wedding-font-sans, 'Inter', sans-serif);
  font-size: 12px;
  color: var(--wedding-primary-light, #b8a090);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

@keyframes gcOverlayFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Name Input ── */
.gc-name-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(140,106,92,0.06);
  border-radius: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(140,106,92,0.12);
}

.gc-name-icon {
  color: var(--wedding-primary);
  flex-shrink: 0;
  display: flex;
}

.gc-name-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  font-family: var(--wedding-font-sans);
  color: var(--wedding-dark);
  outline: none;
}

.gc-name-input::placeholder { color: #bbb; }

/* ── Upload Button ── */
.gc-upload-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--wedding-primary) 0%, var(--wedding-dark) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--wedding-font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(140,106,92,0.35);
  transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

.gc-upload-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(140,106,92,0.5);
}

.gc-upload-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gc-upload-spinner {
  display: inline-flex;
  gap: 4px;
}

.gc-spin-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: gcSpinBounce 1.4s infinite ease-in-out both;
}

.gc-spin-dot:nth-child(1) { animation-delay: -0.32s; }
.gc-spin-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes gcSpinBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Home Indicator */
.gc-home-indicator {
  width: 120px;
  height: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
  margin: 6px auto 0;
}

/* ══════════════════════════════════════
   Masonry Gallery
   ══════════════════════════════════════ */
.gc-gallery-wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.gc-gallery-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.gc-gallery-title-bar h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wedding-font-serif);
  font-size: 18px;
  color: #fff;
  margin: 0;
  font-weight: 600;
}

.gc-photo-count {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 600;
}

.gc-masonry {
  columns: 2;
  column-gap: 12px;
}

@media (min-width: 600px) {
  .gc-masonry { columns: 3; }
}

.gc-masonry-item {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: rgba(255,255,255,0.08);
}

.gc-masonry-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}

.gc-masonry-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s;
}

.gc-masonry-item:hover img { transform: scale(1.06); }

.gc-h-sm img { height: 160px; }
.gc-h-md img { height: 220px; }
.gc-h-lg img { height: 280px; }

/* Overlay */
.gc-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gc-masonry-item:hover .gc-item-overlay { opacity: 1; }

.gc-item-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.gc-item-name svg { flex-shrink: 0; }

.gc-item-date {
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  padding-left: 17px;
}

/* Empty */
.gc-empty-state {
  text-align: center;
  padding: 50px 20px;
  color: rgba(255,255,255,0.4);
  column-span: all;
}

.gc-empty-state p {
  font-size: 13px;
  margin-top: 12px;
  color: rgba(255,255,255,0.5);
}

/* Pagination */
.gc-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.gc-page-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--wedding-font-sans);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-page-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}

.gc-page-btn.active {
  background: linear-gradient(135deg, var(--wedding-primary) 0%, var(--wedding-dark) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(140,106,92,0.4);
}

/* Fade-in */
@keyframes gcFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.gc-masonry-item.gc-new { animation: gcFadeUp 0.5s ease forwards; }

/* ── Mobile ── */
@media (max-width: 520px) {
  .gc-parallax-section {
    padding: 50px 12px;
    background-attachment: scroll;
  }

  .gc-section-title { font-size: 32px; }

  .gc-iphone-frame { max-width: 340px; }

  .gc-iphone-body { border-radius: 40px; padding: 10px; }

  .gc-iphone-screen { border-radius: 32px; padding: 46px 16px 14px; }

  .gc-masonry { columns: 2; column-gap: 8px; }

  .gc-h-sm img { height: 120px; }
  .gc-h-md img { height: 170px; }
  .gc-h-lg img { height: 210px; }

  .gc-item-overlay { opacity: 1; }
}

/* ══════════════════════════════════════
   GuestCam Lightbox
   ══════════════════════════════════════ */
.gc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gc-lightbox.gc-lb-active {
  opacity: 1;
  pointer-events: auto;
}

.gc-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
}

.gc-lb-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

.gc-lb-active .gc-lb-content {
  transform: scale(1);
}

.gc-lb-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}

.gc-lb-info {
  text-align: center;
}

.gc-lb-name {
  color: rgba(255,255,255,0.9);
  font-family: var(--wedding-font-serif);
  font-size: 16px;
  font-weight: 600;
}

.gc-lb-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gc-lb-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--wedding-primary, #8c6a5c), var(--wedding-dark, #2c2523));
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--wedding-font-sans);
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(140,106,92,0.4);
}

.gc-lb-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(140,106,92,0.6);
  color: #fff;
}

.gc-lb-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.gc-lb-close:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

.gc-lb-delete {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(231,76,60,0.4);
}

.gc-lb-delete:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(231,76,60,0.6);
}

.gc-lb-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
