﻿:root {
    --st-body-color: #2c234d;
    --st-body-bg: #fdfbf6;
    --st-bg-dkpurple: #2c234d;
    --st-bg-ltpurple: #a288e3;
    --st-bg-gold: #cdad7d;
    --st-highlight: #cdad7d;
    --st-navlink-hover: #2c234d !important;
    --st-heading: #2c234d;
    --rr-link-color: #c7ad82;
    --rr-link-hover: #a88963; /* slightly darker for hover */
}

/* DO NOT apply brand color to every anchor — only to elements that were
   previously rendered with Bootstrap's primary/blue styling. */

/* Link-like classes that Bootstrap styles in blue */
a.link-primary,
.link-primary,
.text-primary,
a.btn-link,
.btn-link,
.nav-link.active,
.nav a.active,
.pagination .page-item.active .page-link,
.page-item .page-link.active,
.page-item.active > .page-link,
.dropdown-item.active,
.list-group-item.active {
    color: var(--rr-link-color) !important;
}

/* Hover / focus for those specific controls */
a.link-primary:hover,
.link-primary:hover,
.text-primary:hover,
a.btn-link:hover,
.btn-link:hover,
.nav-link.active:hover,
.nav a.active:hover,
.pagination .page-item.active .page-link:hover,
.page-item .page-link.active:hover,
.page-item.active > .page-link:hover,
.dropdown-item.active:hover,
.list-group-item.active:hover {
    color: var(--rr-link-hover) !important;
    text-decoration: underline;
}

/* Keep generic anchors using browser/bootstrap defaults (no global override) */

body {
    font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
    color: #2c234d;
    background-color: var(--st-body-bg:);
    margin: 0;
}

header,
footer {
    /* background-image: linear-gradient(140deg, #2c234d 21%, #a288e3 100%) !important;*/
    background-image: linear-gradient(140deg, var(--st-bg-dkpurple) 21%, var(--st-bg-ltpurple) 100%) !important;
}

header {
    padding-top: 27px;
    padding-bottom: 27px;
    padding-left: 20%;
    padding-right: 20%
}

footer {
    padding-top: 54px;
    padding-bottom: 54px;
    padding-left: 20%;
    padding-right: 20%
}

.headerlogo,
.footerlogo {
    max-width: 255px;
}

.headerlogotxt,
.footerlogotxt {
    color:#fff;
    padding-bottom: 7px;
    font-size: 14px
}

.headerlogotxt a,
.footerlogotxt a {
   color: #fff;
   text-decoration: underline;
}

.headernavlist {
    flex: 1 0 200px;
}

.headernavitem {
    color: #fff;
    text-decoration: none;
}

.headernavitemhighlight {
    /*color: #cdad7d;*/
    color: var(--st-highlight);
    font-weight: 700;
    text-decoration: none
}

.footercopy,
.footernav {
    color: #fff;
    font-size: 12px;
}

/* Headings remain Playfair (display/serif) but not bold per requirement */
h1, h2, h3, h4, h5, h6 {
    color: var(--st-heading);
    font-weight: 400;
    font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
}

.nav a {
    /*color: #3e3462;*/
    color:var(--st-navlink);
}

.nav a:hover,
.nav a.active {
     /*color: #c7ad83 !important;*/
   color: var(--st-navlink-hover) !important;
}

/*Buttons*/

.btn-ltpurple {
    color: #fff;
    background-color: var(--st-bg-ltpurple);
    border-color: var(--st-bg-ltpurple);
}

.btn-ltpurple:hover {
    background-color: #fff;
    color: var(--st-bg-ltpurple);
    border-color: var(--st-bg-ltpurple);
}

#reader_forum {
    /* Make the forum wrapper transparent so the page-level background shows through */
    background-color: transparent;
    padding: 30px 30px 50px 30px;
}

    #reader_forum .text-area {
        min-height: 200px;
    }

    #reader_forum .forum-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: 800px;
        margin: 0 auto 15px auto;
    }

        /* forum header title is a heading so Playfair is appropriate */
        #reader_forum .forum-header h2 {
            font-weight: 400;
            font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
            color: #3a2363;
        }

    #reader_forum .search-box {
        display: flex;
        align-items: center;
        gap: 8px;
        background: white;
        padding: 6px 12px;
        border-radius: 0; /* square corners */
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #ccc;
    }

        #reader_forum .search-box input {
            border: none;
            outline: none;
            background: transparent;
            width: 150px;
            font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
            color: #2c234d;
        }

    #reader_forum .forum-container {
        margin: 0 auto;
        /* Changed from purple to the standard light card background so it matches other pages */
        background-color: #fdfbf7;
        border: 1px solid #c7ad82;
        border-radius: 8px;
        padding: 5px;
        color: #2c234d;
        display: flex;
        flex-direction: column;
        /* Removed fixed 85vh to avoid large empty space when there are few posts.
           Allow container to size to content but limit the posts area below. */
        height: auto;
        min-height: 40vh;
    }

    #reader_forum .category-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    #reader_forum .new-post-btn {
        background-color: #cbb3f4;
        color: #3a2363;
        font-weight: 600;
        border: none;
        border-radius: 6px;
        padding: 8px 14px;
        font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
    }

    #reader_forum .posts-wrapper {
        flex-grow: 1;
        overflow-y: auto;
        padding-right: 8px;
        /* When content is long, allow a comfortable scrolling area; when few posts,
           the container will shrink so no large empty gap appears below the pagination. */
        max-height: 60vh;
    }

        /* Neutral scrollbar to match the light panel */
        #reader_forum .posts-wrapper::-webkit-scrollbar {
            width: 10px;
        }

        #reader_forum .posts-wrapper::-webkit-scrollbar-track {
            background: #e9ecef;
            border-radius: 10px;
        }

        #reader_forum .posts-wrapper::-webkit-scrollbar-thumb {
            background: #d4b07c; /* neutral gold thumb */
            border-radius: 10px;
        }

            #reader_forum .posts-wrapper::-webkit-scrollbar-thumb:hover {
                background: #c7ad82;
            }

    #reader_forum .post-card {
        background: white;
        color: black;
        border-radius: 6px;
        padding: 15px;
        margin-bottom: 15px;
        font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
        color: #2c234d;
    }

        /* post title is a heading; keep Playfair but ensure weight is normal (not bold) */
        #reader_forum .post-card h5 {
            font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
            font-weight: 400;
            color: #2c234d;
        }

    #reader_forum .post-meta {
        font-size: 0.9rem;
        color: #6c757d;
        text-align: right;
        font-style: italic;
    }

    #reader_forum .post-interactions {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 10px;
    }

        #reader_forum .post-interactions i {
            cursor: pointer;
            color: #3a2363;
        }

    #reader_forum .comment-box {
        margin-top: 10px;
    }

        #reader_forum .comment-box input {
            width: 100%;
            border-radius: 4px;
            border: 1px solid #ccc;
            padding: 5px;
            font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
            color: #2c234d;
        }

    #reader_forum .comment {
        margin-top: 8px;
        font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
        color: #2c234d;
    }

        #reader_forum .comment strong {
            display: block;
        }

@media (max-width: 576px) {
    #reader_forum .forum-header {
        flex-direction: column;
        gap: 10px;
    }

    #reader_forum .search-box input {
        width: 100px;
    }

    #reader_forum .forum-container {
        height: auto;
    }

    /* on small screens allow posts-wrapper to expand naturally */
    #reader_forum .posts-wrapper {
        max-height: none;
    }
}

.accordion-button {
    background-color: #2b234b;
    color: white;
    font-size: 20px;
}

.accordion-button:not(.collapsed) {
    background-color: #2b234b;
    color: white;
}

.accordion-button:focus {
    box-shadow: none; /* Optional: removes blue outline on focus */
}

.accordion-button::after {
    background-color: #eee;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    padding: 2px;
    box-sizing: border-box;
}

.accordion-button:not(.collapsed)::after {
    background-color: #eee;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    padding: 2px;
    box-sizing: border-box;
}

/* Normalize selection appearance to the site's theme so headings don't look
   like an unexpected OS-level selection highlight. */
::selection {
  background: rgba(205, 173, 125, 0.25); /* subtle site-gold tint */
  color: inherit;
}

/* Make sure focused headings don't show a selection-style background.
   (If JS is focusing headings on load, this prevents the "selected" look.) */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
  outline: none;
  background: transparent;
}

/* Ensure body-focused welcome text uses DM Sans (body copy) */
.reader-welcome,
.reader-welcome-mobile {
    font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 400; /* normal */
    color: #2c234d;
}

/* Mobile-specific sizing for compact welcome */
.reader-welcome-mobile {
    font-size: 1rem; /* adjust if you want it slightly smaller on mobile */
    line-height: 1.2;
}

/* Label style: bold DM Sans for small labels like "Pin:" and "Reader Name:" */
.label-dm {
    font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 700;
    display: inline-block;
    line-height: inherit;
    color: inherit;
}

/* Menu typography: ensure nav items use DM Sans and the specified dark purple color */
.nav > .nav-item > .nav-link,
.nav-mobile .nav-link,
#navList .nav-link {
    font-family: 'DM Sans', Helvetica, Arial, Lucida, sans-serif;
    color: var(--st-navlink);
}

/* Scoped styles for the component - keeps the desktop layout and provides a mobile burger/dropdown */
.nav-container {
    width: 100%;
}

/* Added: Playfair Display for welcome messages */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400&display=swap');

.reader-welcome,
.reader-welcome-mobile {
    font-family: 'Playfair Display', serif;
    font-weight: 400; /* unbold */
}

/* Playfair Display for questions (unbold) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400&display=swap');

.qa-question {
    font-family: 'Playfair Display', serif;
    font-weight: 400; /* unbold */
}
/* Accent link colour used by Training page modal links */
.accent-link {
    color: #c7ad82 !important;
    text-decoration: none;
}

    .accent-link:hover,
    .accent-link:focus {
        color: #a4885e !important; /* slightly darker on hover */
        text-decoration: underline;
        outline: none;
    }
/* Hide small status labels on small screens */
@media (max-width: 800px) {
  .status-label {
    display: none !important;
  }

  /* Mobile list-group active override: brand gold background + white text */
  .d-md-none .list-group .list-group-item.active,
  .d-md-none .list-group .list-group-item-action.active,
  .d-md-none .list-group .list-group-item.active:hover,
  .d-md-none .list-group .list-group-item-action.active:hover,
  .d-md-none .list-group .list-group-item.active:focus,
  .d-md-none .list-group .list-group-item-action.active:focus {
    background-color: #d4b07c !important;
    border-color: #d4b07c !important;
    color: #ffffff !important; /* white text when highlighted */
  }
}

/**********************/

@media (max-width: 767.98px) {
    /* Small top space above ReaderIdentity; no extra space below band */
    .pt-5.pb-3.text-center {
        padding-top: 8px !important;      /* adjust to taste */
        padding-bottom: 0 !important;
    }

    /* Kill container and row vertical padding/margins inside that band */
    .pt-5.pb-3.text-center > .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .pt-5.pb-3.text-center .row,
    .pt-5.pb-3.text-center .col-md-12 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* The flex container that holds ReaderIdentity + button:
       keep column layout on mobile but add a *small* vertical gap */
    .pt-5.pb-3.text-center
    .d-flex.flex-column.flex-md-row.justify-content-center.justify-content-md-between.align-items-center.align-items-md-end {
        row-gap: 4px !important;          /* space between ReaderIdentity and button */
        column-gap: 0 !important;
    }

    /* Ensure the inner flex for the button doesn't add extra spacing */
    .pt-5.pb-3.text-center
    .d-flex.flex-column.align-items-center.align-items-md-end {
        row-gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pt-5.pb-3.text-center .btn {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Optional: keep border, just controlling padding with the band above */
    .pt-5.pb-3.text-center[style] {
        border-bottom-width: 4px !important;
    }
}
@media (max-width: 767.98px) {
    /* Small top space above ReaderIdentity; small space below the button */
    .pt-5.pb-3.text-center {
        padding-top: 8px !important;       /* space above ReaderIdentity */
        padding-bottom: 8px !important;    /* space below the button */
    }

    /* Kill container and row vertical padding/margins inside that band */
    .pt-5.pb-3.text-center > .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .pt-5.pb-3.text-center .row,
    .pt-5.pb-3.text-center .col-md-12 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* The flex container that holds ReaderIdentity + button:
       keep column layout on mobile but add a *small* vertical gap */
    .pt-5.pb-3.text-center
    .d-flex.flex-column.flex-md-row.justify-content-center.justify-content-md-between.align-items-center.align-items-md-end {
        row-gap: 4px !important;           /* space between ReaderIdentity and button */
        column-gap: 0 !important;
    }

    /* Ensure the inner flex for the button doesn't add extra spacing */
    .pt-5.pb-3.text-center
    .d-flex.flex-column.align-items-center.align-items-md-end {
        row-gap: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pt-5.pb-3.text-center .btn {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Keep the original border width */
    .pt-5.pb-3.text-center[style] {
        border-bottom-width: 4px !important;
    }
}

/* ── Burger menu (mobile only) ─────────────────────────────────────────── */

/* Hidden on all screen sizes by default */
.burger {
    display: none;
    background: transparent;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    width: 56px;
    height: 56px;
    /* Float over the purple header — .page is position:relative */
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.burger-box {
    display: inline-block;
    width: 32px;
    height: 22px;
    position: relative;
}

/* Three white lines — visible on the purple header */
.burger-inner,
.burger-inner::before,
.burger-inner::after {
    display: block;
    background-color: #fff;
    height: 4px;
    border-radius: 3px;
    position: absolute;
    left: 0;
    right: 0;
    transition: transform .25s ease, opacity .2s ease;
}

.burger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.burger-inner::before { content: ""; top: -9px; }
.burger-inner::after  { content: ""; top:  9px; }

/* Animate to X when open */
.burger[aria-expanded="true"] .burger-inner              { transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger-inner::before      { transform: rotate(-90deg) translateX(-7px); top: 0; }
.burger[aria-expanded="true"] .burger-inner::after       { opacity: 0; }

/* Show on mobile, hide on desktop */
@media (max-width: 767.98px) {
    .burger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .burger { display: none !important; }
}

/* Mobile nav dropdown */
.mobile-menu {
    margin-bottom: 0.75rem;
}

.nav-mobile {
    list-style: none;
    margin: 0;
    padding: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .10);
    overflow: hidden;
}

.nav-mobile .nav-item            { border-bottom: 1px solid rgba(0,0,0,.05); list-style: none; }
.nav-mobile .nav-item:last-child { border-bottom: none; }
.nav-mobile .nav-link            { display: block; padding: .75rem 1rem; color: #333; text-decoration: none; }

/* Button styled as inline link — no navigation side effects */
button.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font: inherit;
    display: inline;
}
