/* ── Photo Flip Info Card ─────────────────────────────────────────
   Cover-flow 3D flip with Kodak Royal Paper back texture.
   ────────────────────────────────────────────────────────────── */

/* Clickable cursor on eligible images */
img[data-photo-flip] {
  cursor: pointer;
}

/* ── Overlay (viewport-level backdrop) ────────────────────────── */
.photo-flip-overlay {
  position: fixed;
  inset: 0;
  z-index: 8888;
  background: rgba(0, 0, 0, 0);
  transition: background 0.45s ease;
}
.photo-flip-overlay.active {
  background: rgba(0, 0, 0, 0.35);
}

/* ── Scene (perspective container, positioned at image rect) ──── */
.photo-flip-scene {
  perspective: 1200px;
  cursor: pointer;
}

/* ── Card (preserve-3d, holds front + back) ───────────────────── */
.photo-flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

/* ── Front & Back faces ───────────────────────────────────────── */
.photo-flip-front,
.photo-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  border-radius: 3px;
}

.photo-flip-front img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.photo-flip-back {
  transform: rotateY(180deg);
  background-color: #ede0c4;
  background-image: url('/assets/kodak-royal-paper.jpg');
  background-repeat: repeat;
  background-size: 250px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Cover Flow keyframes ─────────────────────────────────────── */
@keyframes coverFlipToBack {
  0% {
    transform: translateX(0) scale(1) rotateZ(0deg) rotateY(0deg);
  }
  25% {
    transform: translateX(22px) scale(0.93) rotateZ(1.2deg) rotateY(55deg);
  }
  60% {
    transform: translateX(-6px) scale(0.96) rotateZ(-0.3deg) rotateY(145deg);
  }
  82% {
    transform: translateX(2px) scale(1.01) rotateZ(0.1deg) rotateY(186deg);
  }
  100% {
    transform: translateX(0) scale(1) rotateZ(0deg) rotateY(180deg);
  }
}

@keyframes coverFlipToFront {
  0% {
    transform: translateX(0) scale(1) rotateZ(0deg) rotateY(180deg);
  }
  25% {
    transform: translateX(-22px) scale(0.93) rotateZ(-1.2deg) rotateY(125deg);
  }
  60% {
    transform: translateX(6px) scale(0.96) rotateZ(0.3deg) rotateY(35deg);
  }
  82% {
    transform: translateX(-2px) scale(1.01) rotateZ(-0.1deg) rotateY(-6deg);
  }
  100% {
    transform: translateX(0) scale(1) rotateZ(0deg) rotateY(0deg);
  }
}

.photo-flip-card.flip-to-back {
  animation: coverFlipToBack 0.72s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.photo-flip-card.flip-to-front {
  animation: coverFlipToFront 0.72s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ── Info panel (frosted glass on back face) ──────────────────── */
.photo-flip-info {
  width: 82%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-radius: 18px;
  padding: 30px 26px 26px;
  box-shadow:
    0 2px 24px rgba(0, 0, 0, 0.08),
    0 0 0 0.5px rgba(255, 255, 255, 0.35) inset;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
}

.photo-flip-field {
  margin-bottom: 18px;
}
.photo-flip-field:last-of-type {
  margin-bottom: 0;
}

.photo-flip-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 5px;
}

.photo-flip-value {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: #1a1a1a;
}

/* ── App Store button ─────────────────────────────────────────── */
.photo-flip-appstore {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 22px;
  background: #007aff;
  color: #fff;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}
.photo-flip-appstore:hover {
  background: #0066dd;
}
.photo-flip-appstore:active {
  transform: scale(0.96);
  background: #0055bb;
}

/* ── Loading state ────────────────────────────────────────────── */
.photo-flip-loading {
  text-align: center;
  font-size: 13px;
  color: #999;
  padding: 18px 0;
  letter-spacing: 0.02em;
}

/* ── Hint label on back ───────────────────────────────────────── */
.photo-flip-hint {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(120, 100, 60, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  pointer-events: none;
}
