/*
  El Rinconín · Estilos del módulo de fotos
  Álbumes, grids de fotos, modales de subida y moderación.
*/

}  /* ============================================================
   MÓDULO DE FOTOS
   ============================================================ */
.albumes-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.albumes-header h2 { margin: 0; }
.albumes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.album-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.album-card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}
.album-card-cover {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg-dark);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(184,144,74,.12), transparent 50%);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-style: italic; font-size: 13px;
  overflow: hidden;
}
.album-card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.95);
  transition: transform .4s ease;
}
.album-card:hover .album-card-cover img { transform: scale(1.05); }
.album-card-body { padding: 12px 14px 14px; }
.album-card-titulo {
  font-family: 'Fraunces', serif;
  font-size: 15px; font-weight: 600;
  line-height: 1.25; color: var(--ink);
  margin: 0 0 4px;
}
.album-card-meta {
  font-size: 11px; color: var(--ink-soft);
  display: flex; justify-content: space-between;
  align-items: center;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
}
.album-card-pendientes {
  background: var(--accent); color: var(--paper);
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  padding: 2px 8px; border-radius: 8px; text-transform: uppercase;
}

.album-empty {
  text-align: center; padding: 48px 16px;
  color: var(--ink-soft); font-style: italic;
  font-family: 'Fraunces', serif;
}

/* Vista de álbum (dentro) */
.album-detail-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.album-back {
  background: none; border: 0; color: var(--accent);
  cursor: pointer; padding: 0 0 8px; font-size: 13px;
  font-family: 'Fraunces', serif; font-style: italic;
}
.album-back:hover { color: var(--ink); }
.album-detail-titulo {
  font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600;
  line-height: 1.2; color: var(--ink); margin: 0 0 6px;
}
.album-detail-fecha {
  font-size: 11px; color: var(--gold);
  letter-spacing: 0.18em; text-transform: uppercase;
  font-family: 'Inter', sans-serif; font-weight: 500;
}
.album-detail-desc {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: 14px; line-height: 1.5; color: var(--ink-soft);
  margin: 8px 0 0; max-width: 600px;
}

.fotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.foto-tile {
  aspect-ratio: 1;
  background: var(--bg-dark);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .2s;
}
.foto-tile:hover { transform: scale(1.02); }
.foto-tile img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.95);
}
.foto-tile-badges {
  position: absolute; top: 6px; left: 6px;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.foto-badge {
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em;
  padding: 2px 6px; border-radius: 3px; text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.foto-badge-publica { background: var(--sage); color: white; }
.foto-badge-boletin { background: var(--gold); color: var(--ink); }
.foto-badge-pendiente {
  background: var(--accent); color: var(--paper);
}

/* Modales del módulo */
.fotos-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(45, 24, 16, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.fotos-modal-card {
  background: var(--paper);
  border-radius: 4px;
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
.fotos-modal-card.large {
  max-width: 900px;
  padding: 16px;
}
.fotos-modal-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: 0;
  width: 36px; height: 36px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
  z-index: 1;
}
.fotos-modal-close:hover { color: var(--ink); }
.fotos-modal-card h3 {
  font-family: 'Fraunces', serif;
  margin: 0 0 16px;
  font-size: 20px;
}

/* Vista grande de foto en modal */
.foto-viewer {
  text-align: center;
}
.foto-viewer img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 2px;
  margin: 0 auto;
}
.foto-viewer-pie {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--ink-soft);
  margin: 12px 0 0;
  font-size: 14px;
}
.foto-viewer-meta {
  font-size: 11px; color: var(--ink-soft);
  margin: 6px 0 16px;
  letter-spacing: 0.05em;
  font-family: 'Inter', sans-serif;
}
.foto-viewer-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.foto-viewer-actions button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
}
.foto-viewer-actions button:hover { border-color: var(--ink); background: var(--paper); }
.foto-viewer-actions button.activo {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.foto-viewer-actions button.danger {
  border-color: var(--accent); color: var(--accent);
}
.foto-viewer-actions button.danger:hover {
  background: var(--accent); color: var(--paper);
}

/* Subida de fotos */
.upload-dropzone {
  border: 2px dashed var(--line);
  border-radius: 4px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: rgba(255,255,255,0.4);
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(168, 67, 44, 0.05);
}
.upload-dropzone input[type="file"] { display: none; }
.upload-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.upload-preview-item {
  background: var(--paper);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1;
}
.upload-preview-item img {
  width: 100%; height: 100%; object-fit: cover;
}
.upload-preview-progress {
  position: absolute; bottom: 0; left: 0;
  height: 3px; background: var(--accent);
  transition: width .3s;
}
.upload-preview-status {
  position: absolute; top: 4px; right: 4px;
  background: white; border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.upload-preview-status.ok { color: var(--sage); }
.upload-preview-status.err { color: var(--accent); }

@media (max-width: 480px) {
  .albumes-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .album-card-titulo { font-size: 14px; }
  .fotos-grid { grid-template-columns: repeat(3, 1fr); }
  .foto-viewer-actions { grid-template-columns: repeat(2, 1fr); }
}

