/* photos.css — Photo Manager page styles */

/* ── Placeholders ───────────────────────────────────────────────────── */
::placeholder {
    color: #c8cdd5;
    opacity: 1;
}

/* ── Page Layout ────────────────────────────────────────────────────── */
.photos-page {
    padding: 24px 28px 60px;
}

.photos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.photos-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.photos-title .material-symbols-outlined {
    font-size: 26px;
}

.photos-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.last-exported-label {
    font-size: 12px;
    color: #888;
}

/* ── Shared Button Base ─────────────────────────────────────────────── */
.photos-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.photos-btn .material-symbols-outlined {
    font-size: 17px;
}
.photos-btn-primary {
    background: #3498db;
    color: #fff;
}
.photos-btn-primary:hover { background: #2980b9; }
.photos-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.photos-btn-secondary {
    background: #2c3e50;
    color: rgba(255,255,255,0.9);
}
.photos-btn-secondary:hover { background: #1a252f; }

.photos-btn-ghost {
    background: rgba(0,0,0,0.06);
    color: #555;
}
.photos-btn-ghost:hover { background: rgba(0,0,0,0.1); }

.photos-btn-danger {
    background: #e74c3c;
    color: #fff;
}
.photos-btn-danger:hover { background: #c0392b; }

/* ── Action Bar ─────────────────────────────────────────────────────── */
.photos-action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ── Filter Bar ─────────────────────────────────────────────────────── */
.photos-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 22px;
}

.photos-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #fff;
    cursor: pointer;
}
.photos-select:focus { outline: none; border-color: #3498db; }

.filter-toggle-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}
.filter-toggle-label input[type=checkbox] {
    accent-color: #3498db;
    width: 14px; height: 14px;
}

.photo-count-label {
    margin-left: auto;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

/* ── Before-pick mode ─────────────────────────────────────────────── */
.before-pick-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8e1;
    border: 1.5px solid #f9a825;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #5d4200;
}
.before-pick-icon  { color: #f9a825; font-size: 20px; flex-shrink: 0; }
.before-pick-text  { flex: 1; }
.before-pick-cancel { margin-left: auto; flex-shrink: 0; }

.before-pick-card {
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, outline .15s;
}
.before-pick-card:not(.before-pick-self):hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(249,168,37,.45);
    outline: 2px solid #f9a825;
}
.before-pick-self {
    cursor: default;
    opacity: .45;
    pointer-events: none;
}
.before-pick-self-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    border-radius: 6px 6px 0 0;
}

/* ── Size range filter ───────────────────────────────────────────────── */
.size-filter-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}
.size-filter-label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}
.size-range-track {
    position: relative;
    width: 120px;
    height: 20px;
    --range-lo: 0%;
    --range-hi: 100%;
}
.size-range-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
    background: #e0e0e0;
    pointer-events: none;
}
.size-range-track::after {
    content: '';
    position: absolute;
    top: 50%;
    left: var(--range-lo);
    right: calc(100% - var(--range-hi));
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
    background: #3498db;
    pointer-events: none;
}
.size-range-track input[type=range] {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}
.size-range-track input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #3498db;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 2;
}
.size-range-track input[type=range]::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #3498db;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    cursor: pointer;
    pointer-events: all;
}
.size-range-display {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    min-width: 60px;
}
.size-range-display.active {
    color: #3498db;
    font-weight: 600;
}

/* ── Grid Section Headers ────────────────────────────────────────────── */
.grid-section-header {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0 4px;
    border-bottom: 2px solid #e8e8e8;
    margin-top: 10px;
}
.grid-section-header:first-child { margin-top: 0; }
.grid-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.grid-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3498db;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 0 7px;
    min-width: 20px;
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
}
.grid-section-sub {
    font-size: 11px;
    color: #aaa;
}

/* ── Badge variants ──────────────────────────────────────────────────── */
.badge-action {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    line-height: 1;
    transition: filter 0.15s, transform 0.1s;
}
.badge-action:hover  { filter: brightness(1.12); transform: scale(1.05); }
.badge-action:active { transform: scale(0.97); }

.badge-unregistered {
    background: rgba(255,255,255,0.9);
    color: #e67e22;
    border: 1px solid rgba(230,126,34,0.5);
}
.badge-promote {
    background: rgba(39,174,96,0.9);
    color: #fff;
}
.badge-unregister {
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
}
.badge-hide {
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
}
.badge-unhide {
    background: rgba(80,80,80,0.75);
    color: #fff;
    border: none;
}

/* Hidden card — muted appearance when Show Hidden is on */
.photo-card-hidden {
    opacity: 0.45;
    filter: grayscale(60%);
}
.photo-card-hidden:hover {
    opacity: 0.75;
    filter: grayscale(20%);
}

/* Show Hidden toggle in section header */
.show-hidden-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #888;
    cursor: pointer;
    margin-left: 10px;
    user-select: none;
}
.show-hidden-toggle input { cursor: pointer; }
button.admin-section-toggle {
    background: none;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    padding: 2px 10px;
    font-size: 11px;
    color: #555;
    cursor: pointer;
    margin-left: auto;
    white-space: nowrap;
}
button.admin-section-toggle:hover { background: #f3f4f6; }

/* ── Admin / no-preview card ─────────────────────────────────────────── */
.photo-card-img-no-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf4ff !important;
}
.no-preview-icon {
    font-size: 42px;
    color: #aac8e0;
}

.photo-card-admin    { border: 2px solid #b2dfdb; }
.photo-card-unregistered { border: 2px dashed #f0c070; }

.photo-card.promoting {
    opacity: 0.45;
    pointer-events: none;
}

/* ── Photo Grid ─────────────────────────────────────────────────────── */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.photos-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #aaa;
    gap: 10px;
    text-align: center;
}
.photos-empty-state .material-symbols-outlined { font-size: 48px; }
.photos-empty-state p { font-size: 14px; margin: 0; }

/* ── Photo Card ─────────────────────────────────────────────────────── */
.photo-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}
.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.photo-card-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f0f0;
}
.photo-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.photo-card-badges {
    position: absolute;
    top: 6px; left: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-featured {
    background: rgba(243,156,18,0.92);
    color: #fff;
}
.badge-pair {
    background: rgba(52,152,219,0.92);
    color: #fff;
}
.badge-draft {
    background: rgba(127,140,141,0.92);
    color: #fff;
}

.photo-card-info {
    padding: 8px 10px 10px;
    flex: 1;
}
.photo-card-alt {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.photo-card-meta {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-card-year { color: #aaa; }
.photo-card-path {
    font-size: 10px;
    color: #a0a8b8;
    margin-top: 2px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.photo-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}
.badge-svc-mini,
.badge-loc-mini {
    display: inline-block;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.5;
    white-space: nowrap;
}
.badge-svc-mini { background: #e8f0fe; color: #3c5fa8; }
.badge-loc-mini { background: #e6f4ea; color: #2e7d46; }
.photo-card-size {
    font-size: 10px;
    color: #bbb;
    margin-top: 3px;
}

/* ── Layout: grid + docked edit panel ───────────────────────────────── */
.photos-layout {
    display: flex;
    align-items: flex-start;
    max-width: 1600px;
    margin: 0 auto;
}
.photos-page {
    flex: 1;
    min-width: 0;
}

/* ── Edit Side Panel ────────────────────────────────────────────────── */
.edit-panel {
    position: sticky;
    top: 44px;
    height: calc(100dvh - 44px);
    width: 0;
    min-width: 0;
    flex-shrink: 0;
    overflow: hidden;
    background: #fff;
    border-left: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease, min-width 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.edit-panel.open {
    width: 440px;
    min-width: 440px;
    border-left: 1px solid #e0e5ec;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
}

.edit-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #2c3e50;
    color: #fff;
    flex-shrink: 0;
}
.edit-panel-header h3 { font-size: 16px; font-weight: 600; margin: 0; }

.edit-panel-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s;
}
.edit-panel-close-btn:hover { color: #fff; }

.edit-panel-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edit-preview-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.edit-preview-img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    border-radius: 6px;
    background: #f0f0f0;
    display: block;
}
.edit-preview-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.edit-meta-chip {
    font-size: 11px;
    color: #999;
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 10px;
}

.edit-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.edit-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.edit-input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    transition: border-color 0.15s;
}
.edit-input:focus { outline: none; border-color: #3498db; }

.edit-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 10px;
}

.tag-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-cb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #444;
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    padding: 3px 9px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.tag-cb:has(input:checked) {
    background: #dbeeff;
    border-color: #3498db;
    color: #1a6daa;
}
.tag-cb input { display: none; }

.edit-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
}
.edit-toggle-row input[type=checkbox] {
    accent-color: #3498db;
    width: 15px; height: 15px;
}
.edit-toggle-row small { color: #aaa; font-size: 11px; }

.before-pair-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.before-thumb {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #3498db;
    display: none;
}
.before-pair-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.edit-panel-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px 14px;
    border-top: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
}
.edit-panel-footer-sep {
    width: 100%;
    height: 0;
    border-top: 1px solid #eee;
    margin: 2px 0;
}

/* ── Modals ─────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90dvh;
    width: 100%;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #2c3e50;
    color: #fff;
    flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 600; margin: 0; }

.modal-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}
.modal-close-btn:hover { color: #fff; }

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

/* ── Upload Modal ───────────────────────────────────────────────────── */
.upload-modal-box { max-width: 600px; width: 100%; }

.dropzone {
    margin: 20px;
    border: 2px dashed #c0d8f0;
    border-radius: 10px;
    padding: 36px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    color: #888;
}
.dropzone.drag-over {
    background: #eaf4ff;
    border-color: #3498db;
    color: #3498db;
}
.dropzone-icon { font-size: 40px; display: block; margin-bottom: 10px; }
.dropzone p { font-size: 14px; margin: 4px 0; }
.dropzone-sub { font-size: 13px; color: #aaa; }
.file-input-label { color: #3498db; cursor: pointer; text-decoration: underline; }

.upload-global-folder-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px 6px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}
.upload-global-folder-label { font-size: 12px; color: #666; white-space: nowrap; }
.upload-folder-input { flex: 1; min-width: 80px; max-width: 160px; padding: 4px 8px; font-size: 12px; }
.upload-apply-btn { font-size: 11px; padding: 3px 10px; white-space: nowrap; }

.upload-queue {
    padding: 6px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 280px;
}
.queue-item {
    display: grid;
    grid-template-columns: 44px 1fr auto auto;
    align-items: center;
    gap: 8px;
    background: #f8f8f8;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
}
.queue-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: #e0e0e0;
}
.queue-info { overflow: hidden; }
.queue-name {
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
}
.queue-size { font-size: 11px; color: #aaa; }
.queue-folder-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #888;
}
.queue-folder-input {
    width: 90px;
    padding: 2px 6px;
    font-size: 11px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    color: #333;
}
.queue-folder-input:focus { outline: none; border-color: #3498db; }
.queue-remove-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
}
.queue-remove-btn:hover { color: #e74c3c; }
.queue-status { font-size: 11px; color: #aaa; white-space: nowrap; }
.queue-done   { color: #27ae60; }
.queue-error  { color: #e74c3c; }
.queue-geo      { font-size: 11px; color: #888; margin-top: 2px; }
.queue-geo-done { color: #2e7d32; }
.queue-dup-warn {
    font-size: 11px;
    color: #7a5000;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 4px 7px;
    margin-top: 3px;
    line-height: 1.4;
}
.queue-dup-warn em { font-style: normal; word-break: break-all; }
.queue-dup-overridden {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}
.upload-anyway-btn, .undo-anyway-btn {
    background: none;
    border: 1px solid #f0c000;
    border-radius: 3px;
    font-size: 10px;
    padding: 1px 6px;
    cursor: pointer;
    color: #7a5000;
    margin-left: 5px;
    white-space: nowrap;
}
.upload-anyway-btn:hover { background: #fff3c0; }
.undo-anyway-btn { border-color: #ccc; color: #888; }
.undo-anyway-btn:hover { background: #f5f5f5; }
.edit-meta-chip-filename {
    font-size: 11px;
    color: #666;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px 7px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Batch / Select Mode ──────────────────────────────────────────── */
.photos-btn-select-active {
    background: #3498db !important;
    color: #fff !important;
}
.photo-card-selected {
    outline: 3px solid #3498db;
    outline-offset: -2px;
}
.card-checkbox-wrap {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 4;
    cursor: pointer;
    line-height: 1;
}
.card-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
    display: block;
}
.section-select-all {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    margin-left: auto;
    user-select: none;
}
.section-select-all input { cursor: pointer; accent-color: #3498db; }

.upload-modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 16px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}
.upload-stage-count { font-size: 12px; color: #888; flex: 1; }

/* ── Promote Confirm Modal ──────────────────────────────────────────── */
.promote-confirm-box {
    max-width: 880px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.promote-confirm-body {
    display: flex;
    gap: 24px;
    overflow-y: auto;
    padding: 20px 24px;
    flex: 1;
}
.promote-confirm-preview-col {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.promote-confirm-img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    background: #1e1e1e;
    min-height: 160px;
}
.promote-confirm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.promote-confirm-chips span {
    background: #2a2a2a;
    color: #aaa;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #444;
}
.promote-confirm-form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    min-width: 0;
}
.promote-confirm-footer {
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}
.promote-confirm-status {
    font-size: 13px;
    color: #888;
    margin-left: auto;
}
/* Folder + filename path row inside promote modal */
.promote-path-row {
    display: flex;
    align-items: center;
    gap: 2px;
}
.promote-folder-prefix,
.promote-folder-sep {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    user-select: none;
    padding: 0 2px;
}
.promote-folder-input {
    width: 120px;
    flex: 0 0 120px;
    min-width: 0;
}
.promote-filename-input {
    flex: 1;
    min-width: 0;
}
.edit-label-hint {
    font-weight: 400;
    color: #888;
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
}

/* ── Old Promote Modal (unused) ─────────────────────────────────────── */
.promote-modal-box {
    max-width: 800px;
}

#promote-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.promote-projects-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.promote-loading { font-size: 14px; color: #aaa; text-align: center; padding: 20px; margin: 0; }

.promote-project-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: 1px solid #e8e8e8;
    border-radius: 7px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    color: #333;
}
.promote-project-btn:hover { background: #f0f7ff; border-color: #aad4f5; }
.promote-project-btn .material-symbols-outlined { color: #3498db; flex-shrink: 0; }
.promote-project-btn span:nth-child(2) { flex: 1; }
.promote-project-btn small { display: block; color: #aaa; font-size: 11px; margin-top: 1px; }
.promote-arrow { color: #ccc !important; }

.promote-photos-grid {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    align-content: start;
}

.promote-photo-card { cursor: pointer; }
.promote-photo-card.already-promoted { opacity: 0.55; cursor: default; }
.promote-photo-card.promoting { opacity: 0.4; pointer-events: none; }

.promote-badge {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(39,174,96,0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 4px;
}

.promote-back-btn {
    grid-column: 1 / -1;
    justify-self: start;
    margin-bottom: 4px;
}

/* ── Before Picker Modal ────────────────────────────────────────────── */
.before-picker-modal-box {
    max-width: 900px;
}
.before-picker-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    align-content: start;
}
.before-pick-card { cursor: pointer; }
.before-pick-card:hover { outline: 3px solid #3498db; }

/* ── Register banner (inside edit panel) ───────────────────────────── */
.edit-register-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #eaf4ff;
    border: 1px solid #aad4f5;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #2c5f8a;
    line-height: 1.5;
}
.edit-register-banner .material-symbols-outlined {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Delete Modal ───────────────────────────────────────────────────── */
.delete-modal-box {
    max-width: 420px;
    padding: 28px 24px 20px;
}
.delete-modal-box h3 { font-size: 17px; margin: 0 0 10px; color: #2c3e50; }
.delete-modal-box p  { font-size: 14px; color: #555; margin: 0 0 14px; }
.delete-warnings { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.delete-warning  { font-size: 13px; color: #e67e22; background: #fff8f0; border: 1px solid #f0d0a0; border-radius: 5px; padding: 7px 10px; margin: 0; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .photos-page { padding: 16px 14px 40px; }

    .photos-header { flex-direction: column; align-items: flex-start; }
    .photos-header-actions { width: 100%; justify-content: space-between; }

    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .edit-panel.open {
        position: fixed;
        top: 44px; left: 0; right: 0; bottom: 0;
        width: 100vw; min-width: 100vw;
        height: calc(100dvh - 44px);
        z-index: 300;
    }
    .photos-layout { flex-direction: column; }
    .edit-row-3 { grid-template-columns: 1fr 1fr; }
    .edit-row-3 .edit-field:last-child { grid-column: span 2; }

    .promote-modal-box, .promote-confirm-box { max-width: 100%; }
    .promote-confirm-body { flex-direction: column; }
    .promote-confirm-preview-col { flex: none; width: 100%; }
    .promote-confirm-img { max-height: 200px; }
}
