/* Twin Mask Photos: styles that are only for the photo pages, Photographer Tools, People and upload.
   The shared look (colours, header, buttons, fields) is in base.css. */
/* library */
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.filters .fld { flex: 0 1 170px; }
.filters .fld.wide { flex: 1 1 200px; }
.group { margin-top: 32px; }
.group-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; }
.group-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.album-card { display: block; text-decoration: none; color: var(--text); }
.album-card .cover { aspect-ratio: 4 / 3; border-radius: 8px; background: var(--cover); position: relative; overflow: hidden; }
.album-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-card:hover .cover { outline: 2px solid var(--accent); }
.count { position: absolute; right: 8px; bottom: 8px; background: #1f2328; color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.ac-body { padding: 10px 2px 0; }
.ac-title { font-size: 16px; font-weight: 600; }

/* album page photo grid (rows of photos that keep their shape) */
.jgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.jgrid::after { content: ''; flex-grow: 1000000; }
.jtile { position: relative; flex: var(--ar) 1 calc(var(--ar) * 200px); background: var(--cover); border-radius: 6px; overflow: hidden; }
.jtile i { display: block; padding-bottom: calc(100% / var(--ar)); }
.jtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jtile .open { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer; padding: 0; }
.jtile .open:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.jtile .dl { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 8px; border: 0; background: #1f2328; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.jtile.sel { outline: 4px solid var(--accent); outline-offset: -4px; }
.jtile .check { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; display: none; align-items: center; justify-content: center; }
.jtile.sel .check { display: flex; }
.more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 20px; }

dialog.lightbox { width: min(1200px, 96vw); max-height: 96vh; padding: 12px; }
.lb-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lb-stage { display: flex; align-items: center; gap: 8px; }
.lb-stage img { flex: 1 1 0; min-width: 0; max-width: 100%; max-height: calc(96vh - 110px); object-fit: contain; }
.lb-nav { font-size: 24px; padding: 0 14px; }

/* Photographer Tools */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.tool h2 { margin: 0; font-size: 18px; font-weight: 600; }
.tool p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; flex: 1 1 auto; }
.tool .row { display: flex; flex-wrap: wrap; gap: 8px; }
.tools.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tools.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .tools.cols-2, .tools.cols-3 { grid-template-columns: 1fr; } }
.tico { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
table.t { min-width: 560px; }
table.t th, table.t td { padding: 10px 16px; }

/* People and Roles */
table.people { min-width: 560px; }
table.people select.in { min-height: 36px; font-size: 14px; min-width: 150px; }
table.people th { padding: 0; }
button.sorth { padding: 10px 16px; width: 100%; }
dialog.pdlg { width: min(520px, 94vw); max-height: 90vh; overflow-y: auto; }
dl.prof { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 14px; }
dl.prof dt { color: var(--muted); }
dl.prof dd { margin: 0; }
.dbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.scroll-x { overflow-x: auto; }

/* upload page */
.up-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.up-form { flex: 1 1 320px; max-width: 420px; display: grid; gap: 16px; }
.up-form .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.up-form .btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.up-main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.drop { border: 2px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.drop.over { background: var(--surface); }
.drop .big { font-size: 17px; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.tile .pic { aspect-ratio: 1 / 1; background: var(--cover); }
.tile[draggable="true"] { cursor: grab; }
.tile.dragging { opacity: .35; }
.tile.drop-before { box-shadow: -4px 0 0 var(--accent); }
.tile.drop-after { box-shadow: 4px 0 0 var(--accent); }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .meta { padding: 6px 8px; }
.tile .nm { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .bar { height: 4px; border-radius: 2px; background: var(--line); margin: 6px 0 4px; overflow: hidden; }
.tile .bar b { display: block; height: 100%; background: var(--accent); }
.tile .st { font-size: 12px; font-weight: 500; }
.tile .st.bad { color: var(--err-text); }
.tile .acts { display: flex; gap: 6px; margin-top: 4px; }
.tile .acts button { font-size: 12px; background: none; border: 0; padding: 4px 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
