/* ---------------------------------------------------------------------------
   ASDTi buttons drawn with CSS instead of pictures (all pages).
   - Menu tabs: same colours as before (grey, white for the page you are on),
     ASDTi green when pointed at.
   - "Read More", "Contact Us", "Complete" and similar buttons: black pill with a
     white edge and an arrow, ASDTi green when pointed at (like the contact form's
     Send button).
   - Shop "Add to cart" buttons: the same pill.
   Loaded after each page's own styles, so it wins over the old picture rules.
   --------------------------------------------------------------------------- */

/* ---------- Menu tabs (computers; phones and Larger text use the drop-down menu) ---------- */
@media (min-width: 980px) {
    html:not(.big-text) #nav_7 a[class^="Button"] {
        background: none !important;                 /* no picture */
        width: 92px; height: 44px;
    }
    html:not(.big-text) #nav_7 a[class^="Button"]::before {
        content: ""; position: absolute; left: 3px; right: 3px; top: 0; bottom: 3px;
        background: #535353; border-radius: 0 0 10px 10px; transition: background-color .15s;
    }
    html:not(.big-text) #nav_7 a[class^="Button"] span { z-index: 1; color: #ffffff !important; font-size: 11px; font-weight: bold; }
    html:not(.big-text) #nav_7 a[aria-current="page"]::before { background: #ffffff; }
    html:not(.big-text) #nav_7 a[aria-current="page"] span { color: #577443 !important; }   /* a deeper ASDTi green, easy to read on white */
    html:not(.big-text) #nav_7 a[class^="Button"]:hover::before,
    html:not(.big-text) #nav_7 a[class^="Button"]:focus-visible::before { background: #789f60; }
    html:not(.big-text) #nav_7 a[class^="Button"]:hover span,
    html:not(.big-text) #nav_7 a[class^="Button"]:focus-visible span { color: #ffffff !important; }
    html:not(.big-text) #nav_7 a[class^="Button"]:focus-visible { outline: none; }
    html:not(.big-text) #nav_7 a[class^="Button"]:focus-visible::before { box-shadow: inset 0 0 0 2px #ffffff; }
}

/* ---------- Text buttons in the page ("Read More", "Contact Us", "Complete", ...) ----------
   The pill is drawn exactly where the old picture's visible button was: 7px in from each
   side, the top 26px of the box (the rest of the old picture was see-through margin). */
#page a[class*="Button"]:not(nav a):has(> span) {
    background: none !important;                     /* no picture */
    display: flex !important; align-items: center; justify-content: center;
    box-sizing: border-box; padding-bottom: 9px;
}
#page a[class*="Button"]:not(nav a):has(> span)::before {
    content: ""; position: absolute; left: 7px; right: 7px; top: 0; bottom: 9px;
    background: #000000; border: 2px solid #ffffff; border-radius: 999px; box-sizing: border-box;
    transition: background-color .15s, border-color .15s;
}
#page a[class*="Button"]:not(nav a):has(> span) > span {
    position: relative !important; z-index: 1; left: auto !important; top: auto !important; width: auto !important; height: auto !important;
    color: #ffffff !important; font: bold 11px/1 Arial, sans-serif !important; white-space: nowrap;
}
#page a[class*="Button"]:not(nav a):has(> span) > span::after { content: " \2192"; }
#page a[class*="Button"]:not(nav a):has(> span):hover::before,
#page a[class*="Button"]:not(nav a):has(> span):focus-visible::before { background: #789f60; border-color: #789f60; }
#page a[class*="Button"]:not(nav a):has(> span):focus-visible { outline: none; }
#page a[class*="Button"]:not(nav a):has(> span):focus-visible::before { box-shadow: 0 0 0 2px #262626, 0 0 0 4px #ffffff; }

/* ---------- Shop: "Add to cart" (the same 70px space as the old PayPal picture) ---------- */
#page button.cart-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 70px; height: 30px; padding: 0; margin: 2px 0 0;
    border: 2px solid #ffffff; border-radius: 999px; background: #000000; color: #ffffff; box-sizing: border-box;
    font: bold 10.5px/1 Arial, sans-serif; white-space: nowrap; cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
#page button.cart-btn:hover, #page button.cart-btn:focus-visible { background: #789f60; border-color: #789f60; }
#page button.cart-btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    #nav_7 a::before, #page a[class*="Button"]::before, #page button.cart-btn { transition: none; }
}

/* ---------- Readable text on the coloured panels (WCAG AA: at least 4.5 to 1) ----------
   The panel colours are unchanged. Dark grey text on the green, orange, coral, yellow and
   blue panels; white on the deeper red (#ce483c). */
.card[style*="--panel:#789f60"] .card-title, .card[style*="--panel:#cb7f43"] .card-title,
.card[style*="--panel:#ff5f5f"] .card-title, .card[style*="--panel:#e1ca6c"] .card-title,
.card[style*="--panel:#99b0fd"] .card-title,
.card[style*="--panel:#789f60"] .slide-text p, .card[style*="--panel:#cb7f43"] .slide-text p,
.card[style*="--panel:#ff5f5f"] .slide-text p, .card[style*="--panel:#e1ca6c"] .slide-text p,
.card[style*="--panel:#99b0fd"] .slide-text p { color: #262626; }

.cookie[style*="--panel:#789f60"] .cookie-in,
.cookie[style*="--panel:#789f60"] .cookie-in a { color: #262626; }
.cookie[style*="--panel:#789f60"] .tag { background: #262626; color: #ffffff; }

.learn-card[style*="--panel:#789f60"] .learn-head h3,
.learn-card[style*="--panel:#789f60"] .learn-text { color: #262626; }
.learn-card[style*="--panel:#789f60"] .learn-icon { background: rgba(38, 38, 38, .12); color: #262626; }

.dl-row[style*="--dl:#789f60"] .dl-go, .dl-row[style*="--dl:#ff5f5f"] .dl-go { color: #262626; }
.learn-card[style*="--panel:#ce483c"] .learn-head h3 { color: #ffffff; }

/* ---------- A text link shown as a pill button (e.g. "Click to Contact Us") ---------- */
#page a.pill-link {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; box-sizing: border-box;
    border: 2px solid #ffffff; border-radius: 999px; background: #000000; color: #ffffff; text-decoration: none;
    font: bold 12px/1 Arial, sans-serif; white-space: nowrap; transition: background-color .15s, border-color .15s;
}
#page a.pill-link::after { content: "\2192"; }
#page a.pill-link:hover, #page a.pill-link:focus-visible { background: #789f60; border-color: #789f60; }
#page a.pill-link:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
