/*
 * RCPCH colour overrides for NHS frontend
 *
 * Remaps the NHS colour palette to RCPCH brand colours.
 * Loaded after nhsuk-frontend.min.css to take precedence.
 *
 * RCPCH Main Brand:
 *   Dark Blue:   #0D0D58
 *   Bright Blue: #11A7F2
 *
 * RCPCH Strong Blue: #3366CC
 */

/* =============================================
   Typography
   ============================================= */

body,
.nhsuk-body-l,
.nhsuk-body-m,
.nhsuk-body-s,
.nhsuk-label,
.nhsuk-hint,
.nhsuk-button,
.nhsuk-fieldset__legend,
.nhsuk-select,
.nhsuk-input,
.nhsuk-textarea,
.nhsuk-header__service-name,
.nhsuk-back-link__link,
.nhsuk-panel__title,
.nhsuk-panel__body,
h1, h2, h3, h4, h5, h6,
p, li, a {
  font-family: "Montserrat", sans-serif;
}

/* =============================================
   Header
   ============================================= */

.nhsuk-header {
  background-color: #0D0D58;
}

.nhsuk-header__service-name {
  color: #fff;
}

.nhsuk-header__logo path {
  fill: #11A7F2;
}

.nhsuk-header__search .nhsuk-button {
  margin: 0;
}

/* =============================================
   Links
   ============================================= */

a,
.nhsuk-link,
.nhsuk-back-link__link,
.nhsuk-header__service-logo {
  color: #3366CC;
}

a:hover,
.nhsuk-link:hover,
.nhsuk-back-link__link:hover {
  color: #0D0D58;
}

a:visited,
.nhsuk-link:visited {
  color: #7159AA;
}

a:active,
.nhsuk-link:active {
  color: #0D0D58;
}

/* Keep header links white */
.nhsuk-header a,
.nhsuk-header a:visited,
.nhsuk-header a:hover,
.nhsuk-header a:active,
.nhsuk-header__service-logo,
.nhsuk-header__service-logo:visited,
.nhsuk-header__service-logo:hover {
  color: #fff;
}

/* =============================================
   Focus states (keep yellow for accessibility)
   ============================================= */

a:focus,
.nhsuk-link:focus,
.nhsuk-back-link__link:focus,
.nhsuk-button:focus,
.nhsuk-radios__input:focus + .nhsuk-radios__label::before,
.nhsuk-checkboxes__input:focus + .nhsuk-checkboxes__label::before,
.nhsuk-select:focus,
.nhsuk-input:focus,
.nhsuk-textarea:focus {
  outline-color: #FFD200;
  box-shadow: 0 0 0 4px #FFD200;
}

/* =============================================
   Primary button (was NHS green → RCPCH Bright Blue)
   ============================================= */

.nhsuk-button:not(.nhsuk-button--secondary):not(.nhsuk-button--reverse):not(.nhsuk-button--warning) {
  background-color: #11A7F2;
  box-shadow: 0 4px 0 #0082BC;
}

.nhsuk-button:not(.nhsuk-button--secondary):not(.nhsuk-button--reverse):not(.nhsuk-button--warning):hover {
  background-color: #0082BC;
}

.nhsuk-button:not(.nhsuk-button--secondary):not(.nhsuk-button--reverse):not(.nhsuk-button--warning):active {
  background-color: #0D0D58;
  box-shadow: none;
}

/* =============================================
   Secondary button (was NHS blue → RCPCH Strong Blue)
   ============================================= */

.nhsuk-button--secondary {
  background-color: #B3B3B3;
  box-shadow: 0 4px 0 #808080;
  color: #fff;
}

.nhsuk-button--secondary:hover {
  background-color: #808080;
  color: #fff;
}

.nhsuk-button--secondary:active {
  background-color: #4D4D4D;
  box-shadow: none;
  color: #fff;
}

.nhsuk-button--secondary:visited {
  color: #fff;
}

/* =============================================
   Confirmation panel (was NHS green → RCPCH Dark Blue)
   ============================================= */

.nhsuk-panel--confirmation {
  background-color: #0D0D58;
}

.nhsuk-panel--confirmation .nhsuk-panel__title,
.nhsuk-panel--confirmation .nhsuk-panel__body {
  color: #fff;
}

/* =============================================
   Form inputs — selected radios/checkboxes
   ============================================= */

.nhsuk-radios__input:checked + .nhsuk-radios__label::after {
  background-color: #0D0D58;
}

.nhsuk-checkboxes__input:checked + .nhsuk-checkboxes__label::after {
  border-color: #0D0D58;
}

/* =============================================
   Footer
   ============================================= */

.nhsuk-footer {
  background-color: #F3F3F3;
  border-top: 4px solid #11A7F2;
}

/* =============================================
   RTL (Right-to-Left) overrides for Urdu
   ============================================= */

[dir="rtl"] .nhsuk-back-link__link {
  text-decoration: none;
}

[dir="rtl"] .nhsuk-back-link__link .nhsuk-icon__chevron-left {
  transform: rotate(180deg);
}

[dir="rtl"] .nhsuk-radios__label {
  padding-left: 0;
  padding-right: 44px;
}

[dir="rtl"] .nhsuk-radios__label::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .nhsuk-radios__label::after {
  left: auto;
  right: 10px;
}

[dir="rtl"] .nhsuk-checkboxes__label {
  padding-left: 0;
  padding-right: 44px;
}

[dir="rtl"] .nhsuk-checkboxes__label::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .nhsuk-checkboxes__label::after {
  left: auto;
  right: 11px;
}

/* z-index weirdness out of the box with the gov.uk autocomplete */
.autocomplete__dropdown-arrow-down {
  z-index: 1 !important; 
}
