/* Deployment/app_offline.htm copies the page's fonts and colors; update it along with them. */

html, body {
    font-family: Verdana, sans-serif;
    color: #e0e0e0;
}

/*
 * Browsers show the page's background, which is white by default, wherever the page does not reach, such as when
 * scrolling past its end, or below its end behind the toolbar of Safari on iPhones. It has the color of the content,
 * so the page seems to continue there.
 */
body {
    background-color: #2c2c2c;
}

/*
 * The space between a page's title, or the description below it, and the page's content, and between the content and
 * the copyright notice. On a phone, held upright or sideways, the full space would leave too little of the content on
 * the screen. A phone held sideways is wider than one held upright, so it is told apart by its low height instead.
 */
:root {
    --title-spacing: 6rem;
}

@media (max-width: 640.98px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
    :root {
        --title-spacing: 2rem;
    }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

/* On the home page, the content lays out the banner so that the banner fills it (Home.razor.css). */
.content:has(> .home-banner) {
    display: flex;
    flex-direction: column;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIG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DI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Management pages share the content width and title spacing of the public gallery pages. */
.manage-content {
    width: 100%;
    max-width: 1000px;
    margin: var(--title-spacing) auto 0;
}

/*
 * Sections on management pages end with extra space before the next section's heading. Inside a form, the last section
 * keeps a smaller gap to the form's buttons, which belong to all of its sections.
 */
.manage-content section {
    margin-bottom: 3rem;
}

.manage-content form section:last-of-type {
    margin-bottom: 1.5rem;
}

/* Help text below fields on management pages, which Bootstrap colors for a light background. */
.manage-content .form-text {
    color: #a0a0a0;
}

/*
 * The details lists of management pages, such as the statistics of the portfolio, show labels and values in two
 * columns. A long value, such as a path, wraps anywhere rather than reaching past the edge of the screen.
 */
.manage-details > dd {
    overflow-wrap: anywhere;
}

/*
 * On phones, Bootstrap would stack each label above its value. Instead, every entry stays on one line, with the label
 * muted at the left and the value at the right, and thin lines between the entries. The values take at most 60% of
 * the width, and only as much as the longest of them needs, so that the labels have room next to short values.
 */
@media (max-width: 640.98px) {
    .manage-details {
        display: grid;
        grid-template-columns: minmax(0, 1fr) fit-content(60%);
        margin-right: 0;
        margin-left: 0;
        border-bottom: 1px solid #444444;
    }

        .manage-details > dt,
        .manage-details > dd {
            width: auto;
            margin: 0;
            padding: 0.5rem 0;
            border-top: 1px solid #444444;
        }

        .manage-details > dt {
            padding-right: 1rem;
            font-weight: normal;
            color: #a0a0a0;
        }

        .manage-details > dd {
            text-align: right;
        }

    /* The lists of galleries, artworks, and backups have more space between their items for tapping the links. */
    .manage-content li + li {
        margin-top: 0.5rem;
    }
}

/*
 * A section of a management form that is rarely needed folds away behind its heading. Clicking the heading or the
 * chevron after it unfolds the section; the chevron points down while it is open.
 */
.collapsible-section > summary {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    list-style: none;
    cursor: pointer;
}

.collapsible-section > summary::-webkit-details-marker {
    display: none;
}

.collapsible-section > summary::after {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease-in-out;
}

.collapsible-section[open] > summary::after {
    transform: rotate(45deg);
}

.collapsible-section > summary > h2 {
    margin-bottom: 0;
}

.collapsible-section[open] > summary {
    margin-bottom: 0.5rem;
}

/* Required fields on management pages are marked by a faint red background. */
.manage-content .form-control:required,
.manage-content .form-select:required {
    background-color: #fff0f0;
}

/* The dialogs that ask whether to save before leaving a page (unsaved-changes.js) or to confirm a submission (confirm-submit.js). */
.unsaved-changes-dialog,
.confirm-dialog {
    max-width: 32rem;
    padding: 1.5rem;
    border: 1px solid #444444;
    border-radius: 0.5rem;
    background-color: #1d1d1d;
    color: #cccccc;
}

/* Blurs the page behind the dialog without darkening it, like the artwork popup on the gallery page. */
.unsaved-changes-dialog::backdrop,
.confirm-dialog::backdrop {
    background-color: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.unsaved-changes-dialog h2,
.confirm-dialog h2 {
    font-size: 1.25rem;
}

.unsaved-changes-actions,
.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}