/*
 * admin-gallery-list.css
 * Admin gallery list and gallery management table styles.
 * Split from admin.css on 2026-05-12 to keep admin styling modular.
 */

/* Gives the gallery management tab one calm surface instead of several loose controls. */
.admin-gallery-workspace {
    overflow: hidden;
    border: 1px solid var(--admin-border, #d4dde7);
    border-radius: calc(var(--radius, 16px) + 4px);
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

/* Keeps ordering help and bulk controls visually attached to the table they affect. */
.admin-gallery-command-panel {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-bottom: 1px solid #e5ebf2;
    background: linear-gradient(180deg, #fbfdff, #f6f9fc);
}

/* Turns the drag guidance into a compact status strip with one clear message. */
.admin-gallery-order-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 0.8rem 0.95rem;
    border: 1px solid #dbe5ef;
    border-radius: var(--radius, 16px);
    background: rgba(255, 255, 255, 0.72);
}

.admin-gallery-order-toolbar strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #17212b;
    font-size: 0.92rem;
}

.admin-gallery-order-toolbar p {
    margin: 0;
}

/* Makes gallery filters read as a real toolbar and keeps buttons from crowding the table. */
.admin-page .admin-gallery-controls {
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.admin-gallery-controls label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: auto;
    margin: 0;
    color: #17212b;
    font-size: 0.88rem;
    font-weight: 700;
}

.admin-gallery-controls select {
    min-width: 11rem;
    margin: 0;
    background: #fff;
}

.admin-gallery-select-all {
    padding: 0.45rem 0.65rem;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #fff;
}

.admin-gallery-filter-summary {
    min-width: 8rem;
}

/* Allows wide folder paths without making the whole admin page look broken. */
.admin-gallery-table-shell {
    overflow-x: auto;
}

/* Uses separate borders so gallery rows can be styled as readable records. */
.admin-page .admin-gallery-tree-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.admin-gallery-tree-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid #dbe5ef;
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-gallery-tree-table tbody td {
    padding: 0.78rem 0.8rem;
    border-bottom: 1px solid #edf1f5;
    vertical-align: middle;
}

.admin-gallery-tree-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-gallery-tree-table tbody tr:hover td {
    background: #f8fbff;
}

.admin-gallery-tree-table tbody tr.is-subgallery td {
    background-image: linear-gradient(90deg, rgba(34, 113, 177, 0.07), rgba(34, 113, 177, 0) 16rem);
}

.admin-gallery-select-heading,
.admin-gallery-count-heading,
.admin-gallery-actions-heading {
    width: 1%;
}

/* Keeps the legacy handle style available for older cached markup during a deployment. */
.admin-gallery-drag-handle {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #cbd8e5;
    border-radius: 0.65rem;
    background: #fff;
    color: #475569;
    font-size: 14px;
    cursor: grab;
}

.admin-gallery-drag-handle:hover,
.admin-gallery-drag-handle:focus-visible {
    border-color: #2271b1;
    color: #2271b1;
    outline: none;
}

.admin-gallery-title-cell {
    min-width: 32rem;
}

.admin-gallery-summary {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* Uses the visual gallery record itself as the drag affordance, avoiding a separate move column. */
.admin-gallery-summary[data-admin-gallery-drag-zone] {
    cursor: default;
    touch-action: pan-y;
}

.admin-gallery-summary[data-admin-gallery-drag-zone]:active {
    cursor: grabbing;
}

.admin-gallery-summary[data-admin-gallery-drag-zone] a,
.admin-gallery-summary[data-admin-gallery-drag-zone] button {
    cursor: pointer;
    touch-action: manipulation;
}

.admin-gallery-summary[data-admin-gallery-drag-zone] .admin-gallery-preview,
.admin-gallery-summary[data-admin-gallery-drag-zone] .admin-gallery-path,
.admin-gallery-summary[data-admin-gallery-drag-zone] .admin-gallery-parent {
    cursor: grab;
}

.admin-gallery-summary[data-admin-gallery-drag-zone] .admin-gallery-title-link {
    cursor: pointer;
}

.admin-gallery-summary[data-admin-gallery-drag-zone] .tree-toggle {
    cursor: pointer;
}

.admin-gallery-preview {
    display: inline-flex;
    flex: 0 0 7.25rem;
    align-items: center;
    justify-content: center;
    width: 7.25rem;
    height: 4.65rem;
    overflow: hidden;
    border: 1px solid #dbe5ef;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #f8fafc, #eaf1f8);
    color: #718096;
    text-decoration: none;
}

.admin-gallery-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-gallery-preview.is-empty span {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-gallery-summary-text {
    min-width: 0;
}

.admin-gallery-title-link {
    color: #0f4f97;
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.admin-gallery-path,
.admin-gallery-parent {
    display: block;
    max-width: 44rem;
    margin-top: 0.24rem;
    overflow: hidden;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-gallery-parent {
    color: #7a8796;
}

.admin-gallery-state-cell {
    min-width: 8.5rem;
}

.admin-gallery-status-pill,
.admin-gallery-access-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.18rem 0.55rem;
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.3;
    text-transform: capitalize;
}

.admin-gallery-status-pill.is-public {
    border-color: rgba(30, 126, 52, 0.22);
    background: rgba(30, 126, 52, 0.10);
    color: #166534;
}

.admin-gallery-status-pill.is-unpublished,
.admin-gallery-status-pill.is-draft {
    border-color: rgba(180, 83, 9, 0.24);
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
}

.admin-gallery-status-pill.is-private {
    border-color: rgba(71, 85, 105, 0.25);
    background: rgba(100, 116, 139, 0.12);
    color: #334155;
}

.admin-gallery-access-label {
    background: #fff;
    color: #64748b;
    text-transform: none;
}

.admin-gallery-feature-cell {
    min-width: 12rem;
}

.admin-gallery-feature {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    min-width: 2.9rem;
    margin: 0 0.3rem 0.3rem 0;
    padding: 0.22rem 0.42rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-gallery-feature .admin-flag.is-enabled {
    color: #16833a;
    font-weight: 900;
}

.admin-gallery-image-count {
    text-align: right;
}

.admin-gallery-image-count strong {
    display: inline-flex;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #17212b;
}

.gallery-row-actions {
    min-width: 0;
    white-space: nowrap;
}

.gallery-row-action-set {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cbd9e7;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.gallery-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    min-width: 2rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0f4f97;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.gallery-row-action + .gallery-row-action {
    border-left: 1px solid #d8e3ef;
}

button.gallery-row-action.secondary {
    background: transparent;
}

.gallery-row-action:hover,
.gallery-row-action:focus-visible {
    background: #eaf3fb;
    color: #063f7d;
    text-decoration: none;
}

.gallery-row-action-icon {
    transform: translateY(-0.02rem);
}

/* Keeps Admin branding asset controls readable inside the edit-gallery form. */
.admin-branding-assets {
    padding: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.55);
    border-radius: var(--radius, 16px);
}

/* Separates each branding asset control without creating a separate page. */
.admin-branding-asset {
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid rgba(98, 105, 117, 0.22);
    border-radius: calc(var(--radius, 16px) * 0.75);
}

/* Keeps branding labels and descriptions compact. */
.admin-branding-copy {
    display: grid;
    gap: 0.15rem;
}

/* Aligns current branding previews with the remove checkbox. */
.admin-branding-current {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Constrains current branding previews so extreme uploads do not distort Admin. */
.admin-branding-preview {
    display: block;
    max-width: min(26rem, 100%);
    max-height: 8rem;
    object-fit: contain;
    border: 1px solid var(--line);
    background: var(--field);
    border-radius: calc(var(--radius, 16px) * 0.6);
}

.admin-branding-preview-logo {
    max-width: min(12rem, 100%);
}

.admin-branding-preview-separator {
    max-height: 4rem;
}

@media (max-width: 640px) {
    .gallery-title-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-branding-logo {
        max-width: min(11rem, 70vw);
    }

    .gallery-title-bar .gallery-title {
        flex-basis: auto;
        width: 100%;
    }

    .gallery-branding-banner {
        width: 100%;
        max-height: 8rem;
    }

    .public-page .hero .gallery-title-bar {
        gap: 0.45rem;
    }

    .public-page .hero .gallery-branding-logo {
        max-width: min(6rem, 32vw);
        max-height: 2.75rem;
    }

    .public-page .hero .gallery-branding-banner {
        width: 100%;
        max-height: 3.75rem;
    }
}



.admin-language-tab-grid {
    margin-bottom: 1rem;
}

.admin-language-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--admin-border, #d4dde7);
    border-radius: 14px;
    background: #fff;
}

.admin-language-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.admin-language-table th,
.admin-language-table td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--admin-border, #e5ebf2);
    text-align: left;
    vertical-align: top;
}

.admin-language-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted, #64748b);
    background: #f8fafc;
}

.admin-language-table tr:last-child td {
    border-bottom: 0;
}

.admin-language-table code {
    white-space: nowrap;
}

.admin-language-editor {
    margin-top: 1rem;
}

.admin-language-json-editor {
    width: 100%;
    min-height: 26rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.86rem;
    line-height: 1.55;
    tab-size: 2;
    white-space: pre;
}

.admin-language-coverage-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0.25rem 0 0.85rem;
}

.admin-language-coverage-summary span {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--admin-border, #d4dde7);
    border-radius: 999px;
    background: #fff;
}

.admin-language-key-details {
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--admin-border, #d4dde7);
    border-radius: 14px;
    background: #f8fafc;
}

.admin-language-key-details summary {
    cursor: pointer;
    font-weight: 700;
}

.admin-language-key-list {
    display: block;
    max-height: 14rem;
    overflow: auto;
    padding: 0.75rem;
    border: 1px solid var(--admin-border, #d4dde7);
    border-radius: 12px;
    background: #fff;
    white-space: pre-wrap;
}

.admin-language-conventions {
    margin-top: 1rem;
}

.admin-language-convention-list {
    display: grid;
    gap: 0.45rem;
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.admin-language-convention-list code {
    display: inline-flex;
    margin-right: 0.35rem;
    padding: 0.1rem 0.35rem;
    border: 1px solid var(--admin-border, #d4dde7);
    border-radius: 999px;
    background: #fff;
}

/* Admin dashboard render timing panel. */
.admin-render-profile {
    margin: 1.5rem 0;
    border: 1px solid color-mix(in srgb, var(--theme-border, #d1d5db) 80%, transparent);
    border-radius: var(--theme-radius, 18px);
    background: color-mix(in srgb, var(--theme-surface, #ffffff) 94%, transparent);
    color: var(--theme-text, #1f2937);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.admin-render-profile summary {
    cursor: pointer;
    padding: 0.9rem 1rem;
    font-weight: 700;
    user-select: none;
}

.admin-render-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.admin-render-profile h2 {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
}

.admin-render-profile table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.admin-render-profile th,
.admin-render-profile td {
    padding: 0.35rem 0.45rem;
    border-top: 1px solid color-mix(in srgb, var(--theme-border, #d1d5db) 70%, transparent);
    text-align: right;
    vertical-align: top;
}

.admin-render-profile th:first-child {
    text-align: left;
}

.admin-render-profile-note {
    margin: 0;
    padding: 0 1rem 1rem;
    color: var(--theme-muted, #64748b);
    font-size: 0.8rem;
}


