/* Fototeca — mismo tono papel e invitación */

.photobooth-page .photobooth-header {
  padding: 2rem 1.5rem 1rem;
  text-align: center;
}

.photobooth-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.photobooth-back:hover {
  color: var(--color-cta);
}

.photobooth-back:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

.photobooth-title {
  font-family: var(--font-script);
  font-size: 2.25rem;
  font-weight: 400;
  margin: 0 0 0.25rem;
  color: var(--color-ink);
}

.photobooth-subtitle {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  margin: 0;
}

.photobooth-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.photobooth-upload {
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.photobooth-upload h2,
.photobooth-gallery h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--color-ink);
}

.photobooth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition-ui), color var(--transition-ui), border-color var(--transition-ui), transform 0.1s;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.pb-btn-camera {
  background: var(--color-cta);
  color: #fff;
}

.pb-btn-camera:hover {
  background: var(--color-cta-hover);
}

.pb-btn-gallery {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-ink);
}

.pb-btn-gallery:hover {
  background: rgba(0, 0, 0, 0.04);
}

.pb-btn:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

.upload-status {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.upload-status.success { color: var(--color-primary); }
.upload-status.error { color: #a00; }

.photobooth-gallery h2 {
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

.gallery-item img,
.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}

.gallery-empty {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  text-align: center;
  padding: 2rem 1rem;
}

/* Lightbox pantalla completa */
.pb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.92);
  box-sizing: border-box;
}

.pb-lightbox.hidden {
  display: none !important;
}

body.pb-lightbox-open {
  overflow: hidden;
}

.pb-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}

.pb-lightbox-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 10001;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pb-lightbox-close:hover,
.pb-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  outline: none;
}

.hidden { display: none !important; }

@media (max-width: 767px) {
  .photobooth-actions { flex-direction: column; }
  .pb-btn { width: 100%; }
}
