/* =====================================================================
   Gabriel theme on Bootstrap 5.
   Carries over the parts of the old Foundation 3 theme (foundation.css)
   that the site's own mainstyle.css builds on, so the design is unchanged.
   Load after bootstrap.min.css and before mainstyle.css.
   ===================================================================== */

/* ---- Gabriel brand palette ----
   Brand colours: do not change these values. Everything else references them. */
:root {
    --gabriel-red: #ED2D23;              /* primary brand red: headings, links, buttons, nav */
    --gabriel-red-hover: #CC1A11;        /* button / badge hover */
    --gabriel-red-link-hover: #E41D13;   /* text link hover */
    --gabriel-red-border: #B5170F;       /* button border */
    --gabriel-red-deep: #97140D;         /* product menu hover */
    --gabriel-table-red: #E63933;        /* table header rows */
    --gabriel-row-red: #F29C99;          /* alternate table rows */
    --gabriel-gradient-start: #8A1D17;   /* product range panels */
    --gabriel-gradient-end: #CC171C;
    --gabriel-page-bg: #E6E5E5;          /* page background */
    --gabriel-footer-bg: #171717;        /* footer */

    /* Bootstrap picks these up for focus rings, links and selection */
    --bs-primary: var(--gabriel-red);
    --bs-primary-rgb: 237, 45, 35;
    --bs-link-color: var(--gabriel-red);
    --bs-link-color-rgb: 237, 45, 35;
    --bs-link-hover-color: var(--gabriel-red-link-hover);
    --bs-link-hover-color-rgb: 228, 29, 19;
}
.text-brand { color: var(--gabriel-red); }

/* ---- Accessibility ---- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 8px 16px;
    background: var(--gabriel-red);
    color: #fff;
    font-weight: bold;
}
.skip-link:focus { left: 0; color: #fff; }
main:focus { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--gabriel-red);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- Image buttons with a hover state (replaces inline onmouseover swaps) ---- */
.img-swap { display: inline-block; }
.img-swap .img-swap-hover { display: none; }
.img-swap:hover .img-swap-default, .img-swap:focus-visible .img-swap-default { display: none; }
.img-swap:hover .img-swap-hover, .img-swap:focus-visible .img-swap-hover { display: inline; }

/* ---- Image popup (replaces jQuery fancybox) ---- */
#imagePopup .modal-content { background: #fff; border: 0; border-radius: 3px; }
#imagePopup .modal-body { padding: 10px; text-align: center; }
#imagePopup .modal-body img { max-height: 80vh; }
#imagePopup .modal-footer { justify-content: center; padding: 6px 10px 10px; border-top: 0; font-size: 13px; font-weight: bold; }

/* ---- Base typography (Foundation values) ---- */
body {
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #363636;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--gabriel-red); text-decoration: none; }
a:hover { color: var(--gabriel-red-link-hover); }
a:focus { color: var(--gabriel-red); }
h1, h2, h3, h4, h5, h6 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold;
    color: #222222;
    line-height: 1.1;
    margin-top: 14px;
    margin-bottom: 14px;
}
h1 { font-size: 44px; }
h2 { font-size: 37px; }
h3 { font-size: 27px; }
h4 { font-size: 23px; }
h5 { font-size: 17px; }
h6 { font-size: 14px; }
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-size: 60%; color: #6f6f6f; line-height: 0; }
p { font-size: 14px; line-height: 1.6; margin-bottom: 17px; }
ul, ol { font-size: 14px; line-height: 1.6; margin-bottom: 17px; }
ul.disc { list-style-type: disc; padding-left: 0; margin-left: 17px; }
ul.no-bullet { list-style: none; padding-left: 0; }
hr { border: 0; border-top: 1px solid #ddd; opacity: 1; clear: both; margin: 22px 0 21px; }
img { max-width: 100%; height: auto; }

/* ---- Grid: Foundation row behaviour (30px gutters, top-level rows not outset) ---- */
.pageWrapper .row { --bs-gutter-x: 30px; margin-left: 0; margin-right: 0; }
.pageWrapper .row .row { margin-left: -15px; margin-right: -15px; }
.pageWrapper .row.g-0 { --bs-gutter-x: 0; }
.pageWrapper .row .row.g-0 { margin-left: 0; margin-right: 0; }
.pageWrapper .row form .row { --bs-gutter-x: 12px; margin-left: -6px; margin-right: -6px; }
/* Lets a <form> sit inside a .row without breaking the column layout */
.d-contents { display: contents; }

/* ---- Forms ---- */
label { font-size: 14px; color: #4d4d4d; display: block; font-weight: 500; margin-bottom: 3px; }
label.inline { line-height: 32px; margin: 0 0 12px 0; }
.form-control, .form-select {
    font-size: 14px;
    border-color: #cccccc;
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.75);
    margin: 0 0 12px 0;
}
.form-control { padding: 6px; min-height: 32px; }
.form-select { padding-top: 6px; padding-bottom: 6px; min-height: 32px; }
.form-control:focus, .form-select:focus { background-color: #fafafa; border-color: #b3b3b3; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); }
small.error {
    display: block;
    padding: 6px 4px;
    margin-top: -13px;
    margin-bottom: 12px;
    background: var(--gabriel-red);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
}

/* ---- Buttons (Foundation .button.radius in Gabriel red) ---- */
.btn-gabriel {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--gabriel-red);
    --bs-btn-border-color: var(--gabriel-red-border);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--gabriel-red-hover);
    --bs-btn-hover-border-color: var(--gabriel-red-border);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--gabriel-red-hover);
    --bs-btn-active-border-color: var(--gabriel-red-border);
    --bs-btn-focus-shadow-rgb: 237, 45, 35;
    --bs-btn-font-size: 14px;
    --bs-btn-font-weight: bold;
    --bs-btn-line-height: 1;
    --bs-btn-padding-x: 20px;
    --bs-btn-padding-y: 10px;
    --bs-btn-border-radius: 3px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}
/* Foundation "postfix" button: fills its column and lines up with a 32px input */
.btn.postfix { display: block; width: 100%; height: 32px; padding-top: 0; padding-bottom: 0; line-height: 30px; }

/* ---- Labels (Foundation .label.radius) ---- */
.badge-gabriel, .badge-gabriel-secondary {
    padding: 0.25rem 0.5rem;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    border-radius: 0.25rem;
    position: relative;
    bottom: 1px;
}
.badge-gabriel { color: #fff; background: var(--gabriel-red); }
.badge-gabriel-secondary { color: #505050; background: #e9e9e9; }

/* ---- Tables (Foundation table defaults; productTable styling is in mainstyle.css) ---- */
table { background: #fff; border-radius: 3px; margin: 0 0 18px; border: 1px solid #ddd; }
table tbody tr td, table tr td { font-size: 14px; line-height: 18px; text-align: left; color: #333; padding: 9px 10px; vertical-align: top; }
table tbody tr:nth-child(even) { background: #f9f9f9; }

/* ---- Lists used as navigation ---- */
ul.nav-bar { list-style: none; margin: 0; padding: 0; }
ul.nav-bar > li { float: left; display: block; position: relative; padding: 0; margin: 0; }
ul.nav-bar > li > a { display: block; position: relative; padding: 0 20px; color: #e6e6e6; font-size: 14px; text-decoration: none; }
ul.nav-bar > li.active > a { color: #fff; cursor: default; }

ul.side-nav { display: block; list-style: none; margin: 0; padding: 17px 0; }
ul.side-nav li { display: block; list-style: none; margin: 0 0 7px 0; }
ul.side-nav li a { display: block; }
ul.side-nav li.active a { color: #4d4d4d; font-weight: bold; }
ul.side-nav li.divider { border-top: 1px solid #e6e6e6; height: 0; padding: 0; }

ul.inline-list { margin: 0 0 17px -22px; padding: 0; list-style: none; overflow: hidden; }
ul.inline-list > li { list-style: none; float: left; margin-left: 22px; display: block; }
ul.inline-list > li > * { display: block; }

ul.block-grid { display: block; overflow: hidden; padding: 0; list-style: none; }
ul.block-grid > li { display: block; float: left; height: auto; }
ul.block-grid.two-up { margin: 0 -15px; }
ul.block-grid.two-up > li { width: 50%; padding: 0 15px 15px; }
ul.block-grid.two-up > li:nth-child(2n+1) { clear: both; }

/* ---- Mobile menu (Bootstrap navbar replacing Foundation's top-bar) ---- */
.gabriel-navbar { background: #222222; padding-top: 0; padding-bottom: 0; }
.gabriel-navbar .navbar-brand { color: #fff; font-weight: bold; font-size: 17px; }
.gabriel-navbar .navbar-toggler { border: none; box-shadow: none; }
.gabriel-navbar .nav-link { color: var(--gabriel-red); font-weight: bold; padding: 8px 0; border-top: 1px solid #333; }
.gabriel-navbar .nav-link:hover, .gabriel-navbar .nav-link.active { color: #fff; }
