/* Fotos: visor, etiquetas, álbumes, subida. */

/* ---------- visor ---------- */
.pv-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.pv-top h1 { font-size: 16px; font-weight: 400; }
.pv-top .muted { font-size: 11px; }
.pv-nav { display: flex; gap: 6px; }
.pv-stage { position: relative; display: flex; justify-content: center; padding: 12px; background: #f4f4f4; border: 1px solid #e0e0e0; }
.pv-img { position: relative; display: inline-block; max-width: 100%; line-height: 0; user-select: none; -webkit-user-select: none; }
.pv-img img { max-width: 100%; max-height: 560px; padding: 3px; background: #fff; border: 1px solid #ccc; }
.pv-img.tagging { cursor: crosshair; }
.pv-arrow { position: absolute; top: 0; bottom: 0; z-index: 2; display: flex; align-items: center; width: 22%; color: #fff; opacity: 0; transition: opacity .15s; }
.pv-arrow:hover { text-decoration: none; }
.pv-arrow span { display: grid; place-items: center; padding: 14px 6px; background: rgba(0,0,0,.45); border-radius: 3px; }
.pv-arrow.prev { left: 4px; justify-content: flex-start; }
.pv-arrow.next { right: 4px; justify-content: flex-end; }
.pv-img:hover .pv-arrow { opacity: 1; }
.pv-img.tagging .pv-arrow { display: none; }

.tagbox { position: absolute; z-index: 3; width: 84px; height: 84px; border: 3px solid #fff; opacity: 0; pointer-events: none; transform: translate(-50%, -50%); transition: opacity .15s; box-shadow: 0 0 0 1px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.6); }
.tagbox span { position: absolute; top: calc(100% + 5px); left: 50%; padding: 2px 6px; font-size: 11px; line-height: 1.3; color: #fff; white-space: nowrap; background: rgba(0,0,0,.75); border-radius: 2px; transform: translate(-50%); }
.pv-img:hover .tagbox, .tagbox.show { opacity: 1; }
.tagbox.new { opacity: 1; }
.tagbox.new span { display: none; }

.tag-picker { position: absolute; z-index: 5; width: 190px; padding: 6px; text-align: left; line-height: 1.4; background: #fff; border: 1px solid #9fb6cf; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.tag-picker b { font-size: 11px; }
.tag-picker .inp { margin-top: 4px; }
.tag-picker ul { max-height: 170px; margin-top: 4px; overflow-y: auto; }
.tag-picker li button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 4px; font-size: 11.5px; text-align: left; background: none; border: 0; }
.tag-picker li button:hover { background: var(--soft-blue); }
.tag-picker li img { width: 20px; height: 20px; }
.tag-picker .none { padding: 6px 4px; font-size: 11px; color: var(--muted); }
.tag-picker .cancel { margin-top: 2px; font-size: 11.5px; }

.pv-info { display: flex; gap: 20px; margin-top: 12px; }
.pv-info .main { flex: 1; min-width: 0; }
.pv-info .side { flex: none; width: 200px; }
.in-photo { margin-bottom: 8px; font-size: 12px; }
.in-photo a { font-weight: 700; }
.in-photo .x { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.tag-hint { margin-bottom: 8px; padding: 6px 8px; font-size: 11px; background: #fffbe3; border: 1px solid #f0e0a0; border-radius: 3px; }
.album-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 5px; }
.album-strip a { border: 2px solid transparent; }
.album-strip a.on { border-color: #4a7db5; }
.album-strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

#pv .cmts { margin-top: 6px; padding: 2px 8px; background: #f2f5f8; border-radius: 3px; }
#pv .cmt { display: flex; gap: 7px; padding: 6px 0; font-size: 11.5px; border-bottom: 1px solid #e3e9ef; }
#pv .cmt:last-of-type { border-bottom: 0; }
#pv .cmt img { width: 28px; height: 28px; }
#pv .cmt .meta { font-size: 10.5px; }
#pv .cmt .pv-cdel { margin-left: 4px; font-size: 10.5px; opacity: 0; }
#pv .cmt:hover .pv-cdel, #pv .cmt .pv-cdel:focus { opacity: 1; }
#pv .cmt-form { display: flex; align-items: flex-start; gap: 6px; padding: 7px 0; }
#pv .cmt-form img { width: 28px; height: 28px; }
#pv .cmt-form .ta { height: 30px; min-height: 30px; font-size: 11.5px; }
#pv .cmt + .cmt-form { border-top: 1px solid #e3e9ef; }
#pv .cmt-form:first-child { border-top: 0; }

/* ---------- álbumes ---------- */
.albums .album { margin-bottom: 22px; }
.albums h2 { margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.albums h2 .muted { font-size: 11px; font-weight: 400; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-grid a { position: relative; display: block; padding: 3px; background: #fff; border: 1px solid #ccc; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.photo-grid a:hover { border-color: #7aa6d6; }
.photo-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-grid a.ph-new { border-color: #69ae3a; }
.photo-grid .ph-flag { position: absolute; top: 6px; left: 6px; padding: 0 5px; font-size: 10px; font-weight: 700; line-height: 15px; color: #fff; background: linear-gradient(#93cc63, #66a637); border-radius: 8px; }
.fo-priv { padding: 40px 10px; text-align: center; color: #666; background: var(--soft); border: 1px solid var(--line); border-radius: 3px; }
.fo-priv .ico { color: #9fb6cf; }
.fo-priv p { margin: 8px 0 0; }

/* ---------- subida ---------- */
.drop { padding: 24px; text-align: center; color: #666; background: #f7fafd; border: 2px dashed #b8c9db; border-radius: 4px; cursor: pointer; }
.drop.over { background: #eaf2fb; border-color: #6c9cd1; }
.drop .ico { color: #6c9cd1; }
.drop b { display: block; margin-top: 10px; font-size: 13px; color: #555; }
.drop .sub { margin-top: 6px; font-size: 11px; color: #999; }
.up-prev { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 6px; margin-top: 10px; }
.up-prev:empty { display: none; }
.up-prev .it { position: relative; }
.up-prev img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: 1px solid #ccc; }
.up-prev .rm { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; padding: 0; font-size: 12px; line-height: 14px; color: #fff; background: rgba(0,0,0,.6); border: 0; border-radius: 50%; }
.up-album { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.up-album label { flex: none; font-weight: 700; }
.up-album select.inp { width: auto; flex: 1; min-width: 0; height: 26px; padding: 3px 4px; }
.up-title { margin-bottom: 10px; }
.up-info { margin-top: 8px; font-size: 11px; color: var(--muted-2); }
.up-info .err { display: block; }
.up-bar { height: 14px; margin-top: 10px; overflow: hidden; background: #e8eef4; border: 1px solid #c4d2e0; border-radius: 3px; }
.up-bar i { display: block; width: 0; height: 100%; background: linear-gradient(#90cb62, #64a336); transition: width .15s; }
.up-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.up-page { max-width: 480px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.up-modal .modal { width: 480px; }

@media (max-width: 760px) {
  .pv-info { flex-direction: column; }
  .pv-info .side { width: 100%; }
  .pv-arrow { opacity: 1; }
  .tag-picker { font-size: 16px; }
}

.albums .album h2 .al-acts { font-size: 11px; font-weight: 400; margin-left: 6px; }
.albums .album h2 .al-acts .linkbtn { font-size: 11px; }
