/*
 * Folkwang University of the Arts - EDS Theme
 *
 * Colour palette:
 *   #f7f7f7 - Body background, borders
 *   #ff9b14 - Primary accent (buttons, links)
 *   #e08100 - Hover accent
 *   #5f5e54 - Body text, input borders
 *   #B50024 - Error
 *   #1C7D40 - Success
 *   #999999 - Disabled
 */

/* === Language toggle === */
.en, .de { display: none; }
.en:lang(en), .de:lang(de) { display: revert; }

/* === Reset === */
html, html * {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
  background: none;
  background-repeat: no-repeat;
  background-position: left top;
  outline: 0;
}

html {
  height: 100%;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, main {
  display: block;
}

/* === Base === */
body {
  font-family: Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
  font-size: 16px;
  font-size: 1rem;
  line-height: 24px;
  line-height: 1.5rem;
  color: #5f5e54;
  font-weight: 400;
  max-width: 3000px;
  margin: 0 auto;
  background-color: #f7f7f7;
  padding: 16px;
}

a[href] {
  text-decoration: none;
  color: #ff9b14;
}

a[href]:hover, a[href]:active, a[href]:focus {
  text-decoration: underline;
  color: #e08100;
}

footer a[href] {
  color: inherit;
}

footer a[href]:hover,
footer a[href]:active,
footer a[href]:focus {
  color: inherit;
  text-decoration: underline;
}

h1 {
  font-size: 24px;
  font-size: 1.5rem;
  line-height: 28px;
  line-height: 1.75rem;
  font-weight: 700;
  margin-bottom: 0;
}

h2 {
  font-size: 20px;
  font-size: 1.25rem;
  line-height: 25px;
  line-height: 1.5rem;
  font-weight: 400;
}

b, strong {
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
}

.cc {
  clear: both;
  margin: 0 auto;
  width: 100%;
  max-width: 649px;
  padding: 0;
}

/* === Layout === */
main {
  clear: both;
  margin: 0 auto;
  width: 100%;
  max-width: 800px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.25);
}

header {
  display: block;
  border-bottom: 1px solid #f7f7f7;
  text-align: center;
  padding: 24px 8% 12px;
}

header .main-logo {
  display: block;
  margin: 0 auto;
  margin-bottom: 16px;
}

section {
  padding: 16px 8% 20px;
}

footer {
  z-index: 1;
  position: relative;
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  font-size: 0.75rem;
  line-height: 16px;
  line-height: 1rem;
}

/* === EDS Container === */
#idpSelectIdPSelector {
  width: 100%;
  max-width: 100%;
  text-align: left;
  background-color: transparent;
  border: none;
  padding: 0;
}

/* === EDS Section Labels === */
#idpSelectIdPSelector .label {
  font-size: 14px;
  font-size: 0.875rem;
  line-height: 18px;
  line-height: 1.125rem;
  font-weight: 700;
  display: block;
  color: #5f5e54;
  margin-bottom: 6px;
}

/* === Preferred IdP Tile === */
#idpSelectPreferredIdPTile,
#idpSelectPreferredIdPTileNoImg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  height: auto;
  margin-bottom: 16px;
  clear: both;
}

/* === Preferred IdP Buttons === */
div.IdPSelectPreferredIdPButton {
  flex: 1 1 0;
  min-width: 120px;
  background-color: #fff;
  border: 2px solid #5f5e54;
  border-radius: 4px;
  padding: 12px;
  transition: all 0.2s ease-out;
  cursor: pointer;
  text-align: center;
}

div.IdPSelectPreferredIdPButton:hover {
  border-color: #ff9b14;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

div.IdPSelectPreferredIdPButton a {
  display: block;
  width: 100%;
  text-decoration: none;
  color: #5f5e54;
}

div.IdPSelectPreferredIdPButton a:hover {
  text-decoration: none;
}

div.IdPSelectTextDiv {
  height: auto;
  font-size: 14px;
  clear: left;
  color: #5f5e54;
  flex-basis: 100%;
}

div.IdPSelectPreferredIdPImg {
  height: auto;
  min-height: 40px;
  margin: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide the 1x1 placeholder image */
img.IdPSelectIdPImg[width="1"],
img.IdPSelectIdPImg[height="1"] {
  display: none;
}

img.IdPSelectIdPImg {
  width: auto;
}

div.IdPSelectPreferredIdPButton img {
  display: block;
  max-width: 160px;
  max-height: 64px;
  margin: 3px auto;
  border: 0;
  background-color: #fff;
  border-radius: 4px;
  padding: 4px;
}

div.IdPSelectPreferredIdPButton div.IdPSelectTextDiv {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  max-width: 100%;
  height: auto;
  margin-top: 4px;
  word-wrap: break-word;
}

/* === Auto-dispatch === */
div.IdPSelectautoDispatchTile {
  display: block;
}

div.IdPSelectautoDispatchArea {
  margin-top: 20px;
}

/* === Input & Select Controls === */
#idpSelectInput,
#idpSelectSelector {
  background-color: #fff;
  border: 2px solid #5f5e54;
  transition: all 0.3s ease-in-out;
  color: #5f5e54;
  padding: 13px 20px;
  display: inline-block;
  width: calc(100% - 120px);
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  vertical-align: middle;
}

#idpSelectSelector {
  appearance: auto;
  -webkit-appearance: auto;
}

#idpSelectInput {
  appearance: none;
  -webkit-appearance: none;
}

#idpSelectInput:focus,
#idpSelectInput:active,
#idpSelectSelector:focus,
#idpSelectSelector:active {
  border-color: #ff9b14;
  outline: none;
}

/* === Submit / List Buttons === */
#idpSelectSelectButton,
#idpSelectListButton {
  display: inline-block;
  text-align: center;
  background-color: #ff9b14;
  border: 4px solid #ff9b14;
  font-weight: 700;
  padding: 11px 0;
  cursor: pointer;
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 4px;
  transition: all 0.2s ease-out;
  font-size: 16px;
  font-family: inherit;
  vertical-align: middle;
  margin-left: 8px;
  width: calc(120px - 12px);
}

#idpSelectSelectButton:hover,
#idpSelectSelectButton:focus,
#idpSelectListButton:hover,
#idpSelectListButton:focus {
  background-color: #e08100;
  border-color: #e08100;
  color: #fff;
}

/* === Toggle & Help Links === */
a.IdPSelectDropDownToggle {
  display: inline-block;
  width: 82%;
  font-size: 14px;
  color: #ff9b14;
}

a.IdPSelectDropDownToggle:hover {
  color: #e08100;
}

a.IdPSelectHelpButton {
  display: inline-block;
  text-align: right;
  width: 16%;
  font-size: 14px;
  color: #ff9b14;
}

a.IdPSelectHelpButton:hover {
  color: #e08100;
}

/* === Link styling within EDS === */
#idpSelectIdPSelector a:link {
  text-decoration: none;
  color: #ff9b14;
}

#idpSelectIdPSelector a:visited {
  text-decoration: none;
  color: #ff9b14;
}

#idpSelectIdPSelector a:hover {
  text-decoration: underline;
  color: #e08100;
}

/* === Typeahead Dropdown === */
ul.IdPSelectDropDown {
  font-family: Segoe UI, Helvetica, Arial, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  list-style: none;
  padding-left: 0px;
  border: 2px solid #5f5e54;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 6;
  position: absolute;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
}

ul.IdPSelectDropDown li {
  background-color: #fff;
  cursor: pointer;
  padding: 8px 12px;
  border-bottom: 1px solid #f7f7f7;
  color: #5f5e54;
}

ul.IdPSelectDropDown li:last-child {
  border-bottom: none;
}

ul.IdPSelectDropDown li.IdPSelectCurrent {
  background-color: #ff9b14;
  color: #fff;
}

/* Legacy div-based dropdown */
div.IdPSelectDropDown {
  font-family: Segoe UI, Helvetica, Arial, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  border: 2px solid #5f5e54;
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 6;
  position: absolute;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

div.IdPSelectDropDown div {
  background-color: #fff;
  cursor: pointer;
  padding: 8px 12px;
  color: #5f5e54;
}

div.IdPSelectDropDown div.IdPSelectCurrent {
  background-color: #ff9b14;
  color: #fff;
}

/* === Noscript styling === */
noscript {
  display: block;
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
  color: #5f5e54;
}

/* === Dark Mode === */
@media (prefers-color-scheme: dark) {

  body {
    background-color: #101010;
    color: #d4d4d4;
  }

  main {
    background-color: #1a1a1a;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  }

  header {
    border-bottom-color: #2a2a2a;
  }

  footer {
    color: #d4d4d4;
    background-color: rgba(16, 16, 16, 0.6);
  }

  h1, h2, h3, p {
    color: #d4d4d4;
  }

  a[href] {
    color: #ff9b14;
  }

  a[href]:hover, a[href]:active, a[href]:focus {
    color: #e08100;
  }

  #idpSelectIdPSelector .label {
    color: #d4d4d4;
  }

  div.IdPSelectTextDiv {
    color: #d4d4d4;
  }

  div.IdPSelectPreferredIdPButton {
    background-color: #1a1a1a;
    border-color: #d4d4d4;
  }

  div.IdPSelectPreferredIdPButton:hover {
    border-color: #ff9b14;
  }

  div.IdPSelectPreferredIdPButton a {
    color: #d4d4d4;
  }

  #idpSelectInput {
    background-color: #101010;
    border-color: #d4d4d4;
    color: #d4d4d4;
  }

  #idpSelectInput:focus,
  #idpSelectInput:active {
    border-color: #ff9b14;
    background-color: #101010;
  }

  #idpSelectSelector {
    background-color: #101010;
    border-color: #d4d4d4;
    color: #d4d4d4;
  }

  #idpSelectSelector:focus,
  #idpSelectSelector:active {
    border-color: #ff9b14;
    background-color: #101010;
  }

  #idpSelectSelectButton,
  #idpSelectListButton {
    background-color: #ff9b14;
    border-color: #ff9b14;
    color: #fff;
  }

  #idpSelectSelectButton:hover,
  #idpSelectSelectButton:focus,
  #idpSelectListButton:hover,
  #idpSelectListButton:focus {
    background-color: #e08100;
    border-color: #e08100;
  }

  ul.IdPSelectDropDown {
    border-color: #555;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  }

  ul.IdPSelectDropDown li {
    background-color: #1a1a1a;
    border-bottom-color: #2a2a2a;
    color: #d4d4d4;
  }

  ul.IdPSelectDropDown li.IdPSelectCurrent {
    background-color: #ff9b14;
    color: #fff;
  }

  div.IdPSelectDropDown {
    border-color: #555;
  }

  div.IdPSelectDropDown div {
    background-color: #1a1a1a;
    color: #d4d4d4;
  }

  div.IdPSelectDropDown div.IdPSelectCurrent {
    background-color: #ff9b14;
    color: #fff;
  }

  a.IdPSelectDropDownToggle,
  a.IdPSelectHelpButton {
    color: #ff9b14;
  }

  a.IdPSelectDropDownToggle:hover,
  a.IdPSelectHelpButton:hover {
    color: #e08100;
  }

  #idpSelectIdPSelector a:link,
  #idpSelectIdPSelector a:visited {
    color: #ff9b14;
  }

  #idpSelectIdPSelector a:hover {
    color: #e08100;
  }

  noscript {
    color: #d4d4d4;
  }
}
