/* EAUT-55409: accessibility menu and high contrast view. */

/* Drupal wraps each block in <section>, and the base theme gives every
   <section> 40px of padding above and below. Remove it in the top bar. */
.ss-region__ss-top-bar .block-eauth-oman-accessibility-menu {
  padding: 0;
}
/* The menu button, in the top bar beside the language switch. */
.eo-a11y {
  position: relative;
  display: inline-block;
}

.eo-a11y__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: #262863;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.eo-a11y__toggle:hover,
.eo-a11y__toggle:focus {
  text-decoration: underline;
  outline: 2px solid #262863;
  outline-offset: 2px;
}

.eo-a11y__icon {
  flex-shrink: 0;
}

/* The options panel opens under the button. */
.eo-a11y__panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #d0d3e2;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.eo-a11y__panel[hidden] {
  display: none;
}

/* The top bar is laid out left to right in both languages, so the panel
   text follows the page direction itself. */
[dir="rtl"] .eo-a11y__panel {
  direction: rtl;
  text-align: right;
}

.eo-a11y__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid #e3e5ee;
}

.eo-a11y__option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #262863;
  font-size: 14px;
  text-align: inherit;
  cursor: pointer;
}

.eo-a11y__option:hover {
  background: #f2f3f8;
}

.eo-a11y__option:focus {
  outline: 2px solid #262863;
  outline-offset: 1px;
}

/* The option that is on. */
.eo-a11y__option[aria-pressed="true"] {
  background: #262863;
  color: #fff;
  font-weight: 700;
}

/* Phones: the menu sits in the ☰ menu, so the panel opens in place. */
.ss-header--mob .eo-a11y {
  display: block;
}

.ss-header--mob .eo-a11y__panel {
  position: static;
  margin-top: 6px;
  box-shadow: none;
}

/* High contrast: black background, white text, yellow underlined links.
   Images and icons keep their own colours. */
html.eo-high-contrast body,
html.eo-high-contrast body *:not(img):not(svg):not(path):not(circle):not(video) {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* a[href] makes this rule more specific than the general white text rule
   above, so links really turn yellow. */
html.eo-high-contrast body a[href],
html.eo-high-contrast body a[href] * {
  color: #ffeb3b !important;
  text-decoration: underline !important;
}

html.eo-high-contrast body button,
html.eo-high-contrast body .btn,
html.eo-high-contrast body input,
html.eo-high-contrast body select,
html.eo-high-contrast body textarea {
  border: 2px solid #fff !important;
}

html.eo-high-contrast body ::placeholder {
  color: #ccc !important;
}

html.eo-high-contrast body :focus {
  outline: 3px solid #ffeb3b !important;
  outline-offset: 2px !important;
}

/* Logos and images with see-through backgrounds stay visible on black. */
html.eo-high-contrast body img {
  background-color: #fff !important;
}

html.eo-high-contrast .eo-a11y__option[aria-pressed="true"] {
  background-color: #ffeb3b !important;
  color: #000 !important;
}
