/**
 * These rules are shamelessly lifted from  django/contrib/admin/static/admin/css/base.css
 * for "@media (prefers-color-scheme: dark)".
 * "html" added to ":root" for added CSS specificity.
 */
:root {
    --primary: rgba(172, 0, 59, 0.8);
    --secondary: rgba(172, 0, 59, 0.9);
    --accent: rgba(172, 0, 59, 0.7);
    --primary-fg: #fff;

    --body-fg: #333;
    --body-bg: #fff;
    --body-quiet-color: #666;
    --body-loud-color: #000;

    --header-color: #ffc;
    --header-branding-color: var(--accent);
    --header-bg: var(--secondary);
    --header-link-color: #fff;

    --breadcrumbs-fg: #fff;
    --breadcrumbs-link-fg: var(--body-bg);
    --breadcrumbs-bg: rgba(172, 0, 59, 0.6);

    --link-fg: rgba(172, 0, 59, 0.8);
    --link-hover-color: rgba(172, 0, 59, 1);
    --link-selected-fg: rgba(172, 0, 59, 0.8);

    --hairline-color: #e8e8e8;
    --border-color: #ccc;

    --error-fg: #ba2121;

    --message-success-bg: #dfd;
    --message-warning-bg: #ffc;
    --message-error-bg: #ffefef;

    --darkened-bg: #f8f8f8; /* A bit darker than --body-bg */
    --selected-bg: #e4e4e4; /* E.g. selected table cells */
    --selected-row: #ffc;

    --select-border: #777;
    --select-focus: red;
    --select-arrow: var(--select-border);

    --button-fg: #fff;
    --button-bg: rgba(172, 0, 59, 0.6);
    --button-hover-bg: rgba(172, 0, 59, 1);
    --default-button-bg: rgba(172, 0, 59, 0.8);
    --default-button-hover-bg: rgba(172, 0, 59, 1);
    --close-button-bg: #888; /* Previously #bbb, contrast 1.92 */
    --close-button-hover-bg: rgba(172, 0, 59, 0.9);
    --delete-button-bg: #ba2121;
    --delete-button-hover-bg: #a41515;

    --object-tools-fg: var(--button-fg);
    --object-tools-bg: var(--close-button-bg);
    --object-tools-hover-bg: var(--close-button-hover-bg);
}

#user-tools {
    flex: auto;
}

#user-tools a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

#user-tools a:focus, #user-tools a:hover {
    border-bottom-color: #fff;
    color: #fff;
}

input:focus, textarea:focus, select:focus-visible {
    outline-color: var(--primary);
}

#branding h1, #branding h1 a:link, #branding h1 a:visited {
    color: var(--primary-fg);
}

.logo-header {
    max-height: 150px;
    opacity: 0.9;
}

#changelist-filter ul > li > input {
    padding: 10px 12px!important;
}

/* Put delete button on the left and save button on the right */
.submit-row {
    flex-direction: row-reverse;
}
.submit-row a.deletelink {
    margin-left: unset !important;
    margin-right: auto;
}

.prose-editor > .ProseMirror {
    min-height: 200px;
}
