/* ════════════════════════════════════════════════════════════════════════════
   GALLERY ADMIN SYSTEM — styles
   Dark/light compatible (uses its own fixed dark surface, matching the
   existing gse-admin-launcher / gse-edit-toolbar look-and-feel so it reads as
   part of the same admin system rather than a bolted-on extra).
   ════════════════════════════════════════════════════════════════════════════ */

.gal-launcher-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: #fff;
    border: none;
    padding: 0 14px;
    height: 38px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gal-launcher-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.5);
}

body.gallery-edit-active .gal-launcher-btn {
    background: linear-gradient(135deg, #f87171 0%, #b91c1c 100%);
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.45);
}

/* ── Per-item overlay (sits on top of each image/video card in edit mode) ── */
.gal-admin-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px;
    background: rgba(10, 12, 16, 0.55);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    font-family: 'Inter', sans-serif;
    pointer-events: none;
}

body.gallery-edit-active .gal-admin-overlay {
    display: flex;
    pointer-events: auto;
}

.gal-admin-overlay .gal-btn {
    pointer-events: auto;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.gal-admin-overlay .gal-btn:hover { transform: translateY(-1px); }
.gal-admin-overlay .gal-btn:disabled { opacity: 0.6; cursor: wait; }

.gal-btn-delete  { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.gal-btn-update  { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.gal-btn-addmore { background: linear-gradient(135deg, #f59e0b, #b45309); }

.gal-update-box,
.gal-addmore-box {
    pointer-events: auto;
    width: min(260px, 92%);
    background: rgba(15, 16, 20, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gal-update-box label,
.gal-addmore-box label {
    color: rgba(255, 255, 255, 0.65);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.gal-input {
    width: 100%;
    box-sizing: border-box;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 8px;
    font-size: 11.5px;
    font-family: 'Inter', sans-serif;
}

.gal-input:focus { outline: 1px solid #34d399; }

.gal-preview-box { margin-top: 4px; min-height: 0; }

.gal-update-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.gal-update-actions .gal-btn {
    flex: 1 1 auto;
    background: rgba(255, 255, 255, 0.12);
}

.gal-btn-save,
.gal-btn-am-single,
.gal-btn-am-folder { background: linear-gradient(135deg, #34d399, #059669) !important; }

.gal-status-msg { font-size: 10.5px; font-weight: 600; min-height: 13px; }

/* ── Undo toast ─────────────────────────────────────────────────────────── */
.gal-undo-bar {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 20, 20, 0.97);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 50px;
    padding: 10px 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gal-undo-btn {
    background: linear-gradient(135deg, #34d399, #059669);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
}

/* ── Cache manager panel ───────────────────────────────────────────────── */
.gal-cache-mgr {
    position: fixed;
    bottom: 22px;
    right: 16px;
    z-index: 2147483640;
    width: 250px;
    background: rgba(15, 16, 20, 0.97);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gal-cache-mgr-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #34d399;
    margin-bottom: 6px;
}

.gal-cache-stats {
    font-size: 10.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.gal-cache-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.gal-cache-actions .gal-btn {
    flex: 1 1 auto;
    font-size: 10px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.gal-cache-actions .gal-btn:hover { background: rgba(52, 211, 153, 0.25); }

/* ── Mobile responsiveness ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .gal-update-box, .gal-addmore-box { width: 220px; }
    .gal-cache-mgr { width: calc(100% - 32px); right: 16px; left: 16px; }
    .gal-btn-label { display: none; }
    .gal-launcher-btn { padding: 0 10px; }
}
