/* ERE Brand Colors - CSS Custom Properties */
:root {
  /* Core brand colors */
  --ere-burgundy: #800020;
  --ere-green: #04552c;
  --ere-green-dark: #023b1e;

  /* Softened brand colors for modern UI */
  --ere-burgundy-soft: #993344;
  --ere-burgundy-light: #f5e6e9;
  --ere-green-soft: #0d7a47;
  --ere-green-light: #e8f5ed;

  /* Neutral colors */
  --ere-gray-100: #f8f9fa;
  --ere-gray-200: #e9ecef;
  --ere-gray-300: #dee2e6;
  --ere-gray-500: #adb5bd;
  --ere-gray-700: #495057;

  /* Surface colors */
  --ere-surface-primary: #ffffff;
  --ere-surface-secondary: #f8f9fa;
  --ere-border-light: #e9ecef;

  /* ws-editor accent color (shared editor uses this for active button states) */
  --ws-editor-accent: var(--ere-green);
}

a, button {color: var(--ere-green); transition: .3s;}
a {text-decoration: none}
.breadcrumb-item a:hover {text-decoration: underline;}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: #04552c;
    color: #fff;
    text-decoration: none;
    border-radius: 0 0 0.375rem 0.375rem;
    font-weight: 500;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ERE Brand Colors - text utilities */
.darkgreen, .text-ere-green {color: #04552C !important;}
.burgundy, .text-burgundy {color: #800020 !important;}

/* ERE Brand Colors - background utilities */
.bg-burgundy {background-color: #800020 !important;}
.bg-ere-green {background-color: #04552C !important;}
.bg-ere-light {background-color: #f8f8f8 !important;}

.bold {font-weight: bold !important;}

/* override Bootstrap */
.btn-standard {
    color: #fff;
    background-color: #04552c;
}

.btn:hover {
    background-color:#023b1e;
    color: #fefefe;
}

.btn:focus,
.btn:focus-visible {
    background-color:#023b1e;
    color: #fefefe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    outline: none;
}

.btn-outline {
    font-weight: normal;
    border:1px solid #04552c;
    color: #04552c;
    background-color: inherit;
}

.btn-outline:hover {
    color: #023b1e;
    background-color: rgba(4, 85, 44, 0.07);
}

.btn-outline:focus,
.btn-outline:focus-visible {
    color: #023b1e;
    background-color: rgba(4, 85, 44, 0.07);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    outline: none;
}

.btn-burgundy {
    background-color: #800020;
    border-color: #800020;
    color: white;
}
.btn-burgundy:hover {
    background-color: #600018;
    border-color: #600018;
    color: white;
}

.btn-icon {
    background: inherit;
    border: none;
    opacity: 70%;
}

.btn-icon:hover {
    opacity: 100%;
}

.btn_xs {
    font-size: 65%;
    padding: 0.24375rem 0.4875rem;
    opacity: 90%;
}

fieldset {
    border: 1px solid #e7e7e7;
    border-radius: 5px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem;
    max-width: 50rem;
}

fieldset legend {
    margin-top: -1.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    width: auto;
    background-color: #fefefe;
    font-size: 93%;
    color: #7c7c7c;
    position: relative;
}

.emph {
    font-weight: 700;
    color: darkred;
    font-style: italic;
}


.custom-select {
    color: rgb(51, 51, 51);
    width: 100%;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
    background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>") no-repeat right 0.75rem center/8px 10px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    vertical-align: middle;
}
.custom-select:active, .custom-select:focus {
    outline: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    border-color: #000;
}

.page-content {
    padding: 1.5rem;
    margin: 1rem auto;
    width: 100%;
    max-width: 90rem;
    background: #fcfcfc;

    -moz-border-radius: 0.625rem;
    -webkit-border-radius: 0.625rem;
    box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.15);
    -o-box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.15);
    -moz-box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.15);
    -webkit-box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.15);
}

.page-content > .container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.nowrap {
    white-space: nowrap;
}

@media screen and (min-width: 700px) and (max-width: 1461px) {
    .page-content {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media screen and (max-width: 699px) {
    .page-content {
        padding: 1rem;
        margin: 0.5rem;
    }
}

/* Lighter placeholder text — override Bootstrap's .form-control::placeholder */
.form-control::placeholder {
    color: var(--ere-gray-500, #adb5bd);
    opacity: 1;
}

/* Lighter text for empty date/datetime-local inputs (browser shadow DOM, not ::placeholder) */
.form-control.date-empty {
    color: var(--ere-gray-500, #adb5bd);
}

/* Content-block wrapper ({% content_block %} in content/jinja2_ext.py):
   layout-neutral so wrapping a region never changes the page's flow —
   the wrapper's children participate in the parent's layout directly. */
.cb {
    display: contents;
}

/* Keep the Bootstrap navbar visible on the admin pages that load the
   vendored ws-editor.css: its Tailwind bundle ships a global
   `.collapse{visibility:collapse}` utility that otherwise hides the
   `.navbar-collapse.collapse` nav. This unlayered rule beats Tailwind's
   layered utility regardless of load order. The public marketing pages
   don't need it (edit-mode.js injects ws-editor.css only while the editor
   modal is open, and the backdrop covers the chrome), but the
   /manage/content edit page and the email-letter / announcement editors
   load ws-editor.css eagerly. Safe for the mobile collapsed state:
   Bootstrap toggles that via `display:none`, which hides regardless of
   visibility. */
.navbar-collapse.collapse {
    visibility: visible;
}
