/* LostCousins brand palette, taken from the live site (lostcousins.com) so the rewrite stays
   recognisable to existing members rather than introducing a new, unfamiliar colour scheme. */
:root {
    --lc-blue-header: #4782b8;
    --lc-blue-dark: #215a7a;
    --lc-blue-link: #4283a8;
    --lc-blue-accent: #608eba;
    --lc-grey-light: #e7e9eb;
    --lc-red-accent: #d1483f;
    --lc-max-width: 1100px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Roboto, sans-serif;
    color: #2c2c2c;
}

a {
    color: var(--lc-blue-link);
}

.member-page {
    max-width: var(--lc-max-width);
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
}

.preview-banner {
    background: #fff4e5;
    border: 1px solid #f0c987;
    color: #7a5300;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--lc-red-accent);
    color: #ffffff;
}

    .btn-primary:hover {
        background: #b83a32;
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.28);
    }

.btn-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.info-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    line-height: 1.65;
}

    .info-page h1 {
        color: var(--lc-blue-dark);
        margin-bottom: 0.25rem;
    }

    .info-page .lead {
        color: #555555;
        margin-top: 0;
        font-size: 1.05rem;
    }

    .info-page h2 {
        color: var(--lc-blue-dark);
        font-size: 1.3rem;
        margin-top: 2.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--lc-grey-light);
    }

    .info-page h3 {
        font-size: 1.05rem;
        margin-top: 1.75rem;
        margin-bottom: 0.4rem;
        color: #222222;
    }

    .info-page p {
        margin: 0 0 1rem;
    }

    .info-page ul,
    .info-page ol {
        margin: 0 0 1rem;
        padding-left: 1.4rem;
    }

    .info-page blockquote {
        margin: 1rem 0;
        padding: 0.75rem 1.25rem;
        border-left: 3px solid var(--lc-blue-accent);
        background: var(--lc-grey-light);
        font-style: italic;
        color: #444444;
    }

.info-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    background: var(--lc-grey-light);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

    .info-jump-nav a {
        white-space: nowrap;
    }

.newsletters-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    line-height: 1.6;
}

    .newsletters-page h1 {
        color: var(--lc-blue-dark);
        margin-bottom: 0.25rem;
    }

    .newsletters-page .lead {
        color: #555555;
        margin-top: 0;
        font-size: 1.05rem;
    }

    .newsletters-page h2 {
        color: var(--lc-blue-dark);
        font-size: 1.3rem;
    }

    .newsletters-page h3 {
        font-size: 1.05rem;
        margin: 1.75rem 0 0.4rem;
        scroll-margin-top: 1rem;
    }

.newsletter-latest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    background: var(--lc-grey-light);
    border-left: 4px solid var(--lc-blue-header);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
}

    .newsletter-latest h2 {
        margin: 0.15rem 0 0.25rem;
    }

    .newsletter-latest p {
        margin: 0;
        color: #555555;
    }

.newsletter-latest-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lc-blue-header);
}

.newsletter-search {
    margin-bottom: 2rem;
}

    .newsletter-search form {
        display: flex;
        gap: 0.5rem;
    }

    .newsletter-search input[type=search] {
        flex: 1;
        min-width: 0;
        font-size: 1rem;
        padding: 0.6rem 0.9rem;
        border: 1px solid #b5bcc4;
        border-radius: 6px;
    }

        .newsletter-search input[type=search]:focus {
            outline: 2px solid var(--lc-blue-accent);
            border-color: var(--lc-blue-accent);
        }

.newsletter-list {
    margin: 0 0 1rem;
    padding-left: 1.4rem;
}

    .newsletter-list li {
        margin-bottom: 0.3rem;
    }

.newsletter-date,
.newsletter-count {
    color: #666666;
}

/* A newsletter reads as a white page on a tinted desk: the column keeps lines a comfortable length
   (around 85-95 characters) on wide screens, and the tint makes the space either side look
   intentional. On a phone the page simply fills the screen. */
main:has(> .newsletter-issue),
.newsletter-preview-overlay {
    background: #dde3e9;
}

.newsletter-issue {
    max-width: 1050px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
    line-height: 1.5;
    overflow-wrap: break-word;
    background: #ffffff;
}

@media (min-width: 1100px) {
    .newsletter-issue {
        margin: 1.5rem auto 2.5rem;
        padding: 2rem 3rem 4rem;
        border: 1px solid #c8d1da;
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(30, 50, 70, 0.08);
    }
}

    .newsletter-issue > h1 {
        color: var(--lc-blue-dark);
    }

.newsletter-issue-nav {
    font-size: 0.9rem;
}

/* Newsletter editor: offer of a web-sized copy of a large uploaded picture. */
.large-image-warning {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    max-width: 820px;
    background: #fff8eb;
    border: 1px solid #f0c987;
    border-radius: 6px;
    color: #78350f;
}

    .large-image-warning img {
        width: 96px;
        height: 72px;
        object-fit: cover;
        border-radius: 4px;
        flex-shrink: 0;
    }

.large-image-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* The admin newsletter editor's Preview: the public issue page's look, over the editor. */
.newsletter-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    overflow-y: auto;
    /* Background: the tinted "desk" shared with the public page (see .newsletter-issue). */
}

.newsletter-preview-bar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    background: #fff8eb;
    border-bottom: 1px solid #f0c987;
    color: #78350f;
}

/* Printing. The Preview is a fixed, scrolling layer over the editor, so the browser printed only the
   part on screen: while it's open, print just the newsletter, laid out as ordinary pages. The public
   issue page (and an admin's view of a draft there) drops the site's header, footer and links. */
@media print {
    body:has(.newsletter-preview-overlay) .admin-header,
    body:has(.newsletter-preview-overlay) .admin-nav,
    body:has(.newsletter-preview-overlay) .admin-content > :not(.newsletter-preview-overlay),
    .newsletter-preview-bar,
    .newsletter-issue > .rz-button,
    .site-header,
    .site-footer,
    .newsletter-issue-nav,
    .newsletter-issue-preview {
        display: none !important;
    }

    .newsletter-preview-overlay {
        position: static;
        overflow: visible;
    }

    main:has(> .newsletter-issue),
    .newsletter-preview-overlay {
        background: none;
    }

    .newsletter-issue {
        max-width: none;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
}

/* Notification send page: the email as members will get it. The frame keeps the site's own styles
   out, so it looks as it will in an email program. */
.email-preview {
    margin-top: 2rem;
    max-width: 820px;
}

.email-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

    .email-preview-header h4 {
        margin: 0;
    }

.email-preview-note {
    color: #555;
    margin: 0.25rem 0 0.75rem;
}

.email-preview-envelope {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.2rem 0.75rem;
    margin: 0;
    padding: 0.6rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

    .email-preview-envelope dt {
        color: #555;
    }

    .email-preview-envelope dd {
        margin: 0;
        overflow-wrap: anywhere;
    }

.email-preview-frame {
    display: block;
    width: 100%;
    height: 720px;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    background: #ffffff;
}

.email-preview-window.phone {
    width: 375px;
    max-width: 100%;
}

.email-preview-text {
    margin-top: 0.75rem;
}

    .email-preview-text pre {
        white-space: pre-wrap;
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
        background: #f5f5f5;
        border: 1px solid #ddd;
        border-radius: 6px;
    }

.newsletter-issue-preview {
    background: #fff8eb;
    border: 1px solid #f0c987;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    color: #78350f;
}

/* The issue's own formatting comes inline from Word (see HtmlCleaner); these are the defaults it
   was written against on the old site -- a plain browser page -- so unstyled text still matches. */
.newsletter-issue-content {
    color: #000000;
    font-family: "Times New Roman", serif;
    line-height: normal;
    margin: 1.5rem 0;
}

    .newsletter-issue-content a {
        color: blue;
    }

        .newsletter-issue-content a:visited {
            color: purple;
        }

/* Old issues are Word exports with fixed pixel widths; keep them inside the column on phones. */
.newsletter-issue-content img {
    max-width: 100%;
    height: auto;
}

.newsletter-issue-content table {
    max-width: 100%;
}

/* Newsletters written in the editor (not imported from the old site) share one house font, and the
   editor shows it too so a draft looks the same there as in Preview and once published. Pasted
   fonts are stripped (NewsletterFonts), so everything without a deliberate choice lands on this. */
.newsletter-issue-content.newsletter-house-style,
.newsletter-house-style .rz-html-editor-content {
    color: #000000;
    font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 1.5rem;
}

    .feedback-form fieldset {
        border: none;
        padding: 0;
        margin: 0 0 0.5rem;
    }

    .feedback-form legend,
    .feedback-form label {
        font-weight: 600;
        margin-top: 0.6rem;
    }

    .feedback-form .optional {
        font-weight: 400;
        color: #666666;
    }

.feedback-screenshot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--lc-grey-light);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
}

.field-hint {
    font-size: 0.85rem;
    color: #666666;
    margin: 0;
}

.field-error {
    font-size: 0.9rem;
    color: #b3261e;
    margin: 0;
}

/* Honeypot field: off-screen rather than display:none, which some bots skip. */
.feedback-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-secondary-outline {
    background: #ffffff;
    color: var(--lc-blue-link);
    border: 1px solid var(--lc-blue-accent);
}

    .btn-secondary-outline:hover {
        background: var(--lc-grey-light);
    }

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+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}