/*
 * admin-media-tools.css
 * Media, NSFW, and public thumbnail overlay admin styles.
 * Split from admin.css on 2026-05-12 to keep admin styling modular.
 */

/* Marks update recovery actions as potentially destructive maintenance operations. */
.danger-zone {
    border-color: rgba(190, 40, 40, 0.35);
}

/* Makes the clean reinstall button visually separate from normal update actions. */
.button.danger,
button.danger {
    border-color: rgba(190, 40, 40, 0.65);
}

.admin-log-table-wrap {
    overflow-x: auto;
}

.admin-log-table th a {
    color: inherit;
    text-decoration: none;
}

.admin-log-table th a:hover,
.admin-log-table th a:focus-visible {
    text-decoration: underline;
}

[data-admin-log-live-state] {
    min-width: 7rem;
}

.nsfw-stage {
    align-items: stretch;
    background: rgba(0, 0, 0, 0.08);
    min-height: 180px;
}

.nsfw-placeholder {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
    min-height: 180px;
    padding: 1.5rem;
    text-align: center;
    width: 100%;
}

.nsfw-placeholder strong {
    font-size: 1.15rem;
}

.nsfw-placeholder span {
    color: var(--muted-text, #666);
    max-width: 18rem;
}

/* Refines the admin account screen into readable profile and recovery panels. */
.account-settings-page {
    display: grid;
    gap: 1rem;
}

/* Keeps the page title, help text, and recovery state visible before the forms. */
.account-settings-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
    gap: 1rem;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #f6f7f7);
}

.account-settings-kicker {
    margin: 0 0 0.35rem;
    color: #646970;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-settings-hero h1 {
    margin-bottom: 0.35rem !important;
}

/* Shows whether password reset is usable without forcing the admin to inspect every field. */
.account-settings-status {
    display: grid;
    gap: 0.2rem;
    align-content: center;
    padding: 0.9rem;
    border: 1px solid #dcdcde;
    border-left-width: 4px;
    border-radius: 8px;
    background: #ffffff;
}

.account-settings-status.is-ready {
    border-left-color: #008a20;
}

.account-settings-status.is-incomplete {
    border-left-color: #d63638;
}

.account-settings-status-label {
    color: #646970;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-settings-status strong {
    font-size: 1.05rem;
}

.account-settings-status small {
    color: #646970;
    line-height: 1.35;
}

/* Places profile and recovery configuration next to each other on wider admin screens. */
.account-settings-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.account-settings-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #ffffff;
}

.account-settings-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #dcdcde;
}

.account-settings-card-header h2 {
    margin-bottom: 0.35rem !important;
}

.account-settings-form label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

.account-settings-form input,
.account-settings-form select {
    width: 100%;
}

.account-settings-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.account-settings-help {
    margin: 0;
    color: #646970;
    font-size: 0.92rem;
    line-height: 1.45;
}

.account-settings-callout,
.account-settings-readiness {
    padding: 0.75rem 0.85rem;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #2271b1;
    border-radius: 6px;
    background: #f6f7f7;
    line-height: 1.45;
}

.account-settings-toggle {
    display: flex !important;
    gap: 0.65rem !important;
    align-items: flex-start !important;
    padding: 0.8rem;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #f6f7f7;
}

.account-settings-toggle input {
    flex: 0 0 auto;
    margin-top: 0.2rem !important;
}

.account-settings-toggle span {
    display: grid;
    gap: 0.15rem;
}

.account-settings-toggle small {
    color: #646970;
    font-weight: 400;
    line-height: 1.35;
}

.account-settings-details {
    padding: 0.85rem;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fbfbfc;
}

.account-settings-details summary {
    cursor: pointer;
    font-weight: 700;
}

.account-settings-details > * + * {
    margin-top: 0.8rem;
}

.account-settings-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 0.25rem;
}

.account-settings-test-form {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px dashed #c3c4c7;
    border-radius: 6px;
    background: #f6f7f7;
}

.account-settings-test-form p {
    margin: 0.25rem 0 0;
}

@media (max-width: 900px) {
    .account-settings-hero,
    .account-settings-grid,
    .account-settings-two-column {
        grid-template-columns: 1fr;
    }

    .account-settings-test-form {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Keeps public photo metadata over the thumbnail so descriptions do not change the card height. */
.image-stage > .image-meta-overlay {
    position: absolute;
    right: 0.35rem;
    bottom: 0.35rem;
    left: 2.9rem;
    z-index: 5;
    max-width: calc(100% - 3.25rem);
    max-height: calc(100% - 0.7rem);
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    background: rgba(255, 250, 240, 0.88);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
    color: var(--text);
    line-height: 1.25;
    overflow: hidden;
    pointer-events: none;
}

/* Keeps overlaid titles compact and prevents long titles from stretching the grid. */
.image-stage > .image-meta-overlay h2 {
    margin: 0 0 0.18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Truncates public photo descriptions to a readable two-line caption with an ellipsis. */
.image-stage > .image-meta-overlay p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Keeps tag chips from turning the metadata overlay into a tall panel. */
.image-stage > .image-meta-overlay .tag-list {
    max-height: 1.65rem;
    margin-top: 0.35rem;
    overflow: hidden;
}

/* Gives the metadata overlay more room on narrow screens where the vote badge is less likely to overlap. */
@media (max-width: 520px) {
    .image-stage > .image-meta-overlay {
        left: 0.35rem;
        max-width: calc(100% - 0.7rem);
    }
}

/* Gives the Theme editor the same calm workspace rhythm as the Dashboard tabs. */
