:root{
  --gray: #1e1e1e;
  --orange: #df4e19;
}

svg.sidebar-icon{
  width: 25px;
  color: white;
}

div.links-container{
  height: 100%;
  width: 100%;

  display: flex;
  flex-direction: row;
  align-items: center; 
}

button.open-settings-button-pc{
  border: none;
  width: 38px;
  height: 38px;
  background: var(--gray);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  margin-right: 10px;
}

button.open-settings-button-mobile{
  border: none;
  width: 38px;
  height: 38px;
  background: var(--gray);
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  margin-right: 10px;
}

svg.settings-icon{
  width: 19px;
  height: 19px;
}

div.settings-menu-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1090;
}

div.settings-menu-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

section.settings-menu-panel{
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  width: min(440px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid #e7e7e7;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translate(-50%, -52%) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1100;
}

section.settings-menu-panel.is-open{
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

div.settings-panel-header{
  position: relative;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #ececec;
}

span.settings-panel-eyebrow{
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--orange);
  margin-bottom: 8px;
}

h2.settings-panel-title{
  font-size: 1.24rem;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--gray);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

p.settings-panel-subtitle{
  font-size: 0.79rem;
  color: #686868;
  line-height: 1.55;
  max-width: 340px;
}

button.settings-close-button{
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #4a4a4a;
  cursor: pointer;
}

svg.settings-close-icon{
  width: 16px;
  height: 16px;
}

div.settings-panel-content{
  padding: 14px;
  display: grid;
  gap: 10px;
}

article.settings-card{
  border: 1px solid #e6e6e6;
  border-radius: 11px;
  padding: 14px;
}

div.settings-card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

div.settings-card-head h3{
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
}

article.settings-card p{
  font-size: 0.77rem;
  line-height: 1.6;
  color: #666666;
}

label.settings-field-label{
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5c5c5c;
  margin-bottom: 6px;
}

select.settings-select{
  width: 100%;
  height: 38px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--gray);
  padding: 0 10px;
  background: #ffffff;
}

div.settings-font-controls{
  display: flex;
  align-items: center;
  gap: 10px;
}

button.settings-font-button{
  width: 44px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid #d8d8d8;
  background: #ffffff;
  color: var(--gray);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

span.settings-font-size-indicator{
  font-size: 0.74rem;
  color: #666666;
  min-width: 54px;
  text-align: center;
}

label.settings-switch{
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}

label.settings-switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

span.settings-switch-slider{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d6d6d6;
  transition: background-color 0.2s ease;
}

span.settings-switch-slider::before{
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

label.settings-switch input:checked + span.settings-switch-slider{
  background: var(--orange);
}

label.settings-switch input:checked + span.settings-switch-slider::before{
  transform: translateX(20px);
}

div.intrams-navigation-group{
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

div.info-navigation-group{
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

a.navigation-link-text{
  height: 100%;
  padding: 0px 20px;

  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-size: 14px;
}

#sidebar-active{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

label.open-sidebar-button, label.close-sidebar-button{
  display: none;
}

div.intrams-sub-navigation{
  display: none;
  flex-direction: column;

  position: absolute;
  top: calc(100%);
  left: 0;
  background-color: var(--gray);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  min-width: 190px;
  padding: 8px 0;
  z-index: 30;

}

div.info-sub-navigation{
  display: none;
  flex-direction: column;

  position: absolute;
  top: calc(100%);
  left: 0;
  background-color: var(--gray);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  min-width: 190px;
  padding: 8px 0;
  z-index: 30;
}

a.sub-navigation-link{
  color: white;
  font-size: 14px;
  text-decoration: none;
  padding: 10px 16px;
}

a.sub-navigation-link:hover{
  background-color: rgba(255, 255, 255, 0.08);
}

div.sup-navigation{
  display: flex;
  align-items: center;
  padding: 0px 20px;
  gap: 2px;
  height: 100%;
}

div.sup-navigation a{
  padding: 0;
}

label.navigation-dropdown{
  display: flex;
  align-items: center;
  cursor: pointer;
}

svg.dropdown-icon{
  height: 14px;
  fill: white;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

#intrams-dropdown-active{
  display: none;
}

#info-dropdown-active{
  display: none;
}

div.intrams-navigation-group:hover div.intrams-sub-navigation,
input#intrams-dropdown-active:checked ~ div.intrams-sub-navigation{
  display: flex;
}

div.info-navigation-group:hover div.info-sub-navigation,
input#info-dropdown-active:checked ~ div.info-sub-navigation{
  display: flex;
}

div.intrams-navigation-group:hover svg.dropdown-icon,
input#intrams-dropdown-active:checked ~ div.sup-navigation svg.dropdown-icon{
  transform: rotate(180deg);
}

div.info-navigation-group:hover svg.dropdown-icon,
input#info-dropdown-active:checked ~ div.sup-navigation svg.dropdown-icon{
  transform: rotate(180deg);
}

div.mobile-intrams-sub-navigation, div.mobile-info-sub-navigation{
  display: none;
}

div.main-nav-container{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;

  flex-direction: row-reverse;
  position: relative;
  z-index: 4;
}

@media (max-width: 1150px){
  button.open-settings-button-pc{
    display: none;
  }

  button.open-settings-button-mobile{
    display: inline-flex;
  }

  div.links-container{
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    right: -100%;
    z-index: 10;
    width: 250px;
    background-color: var(--gray);
    box-shadow: -5px 0 5px rgba(0, 0, 0, 0.25);
    transition: 0.75s ease-out;
  }

  a.navigation-link-text{
    box-sizing: border-box;
    height: auto;
    padding-left: 20px;
    padding-top: 30px;
    justify-content: flex-start;
  }

  div.intrams-navigation-group, div.info-navigation-group{
    display: flex;
    width: 100%;
    padding-left: 0;
    padding-top: 0;
    height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  div.sup-navigation{
    width: 100%;
    padding: 0;
    justify-content: space-between;
    align-items: center;
  }

  div.sup-navigation a.navigation-link-text{
    width: auto;
    padding-left: 20px;
    padding-top: 30px;
    flex: 1;
  }

  label.navigation-dropdown{
    padding-top: 30px;
    padding-right: 20px;
  }

  div.intrams-sub-navigation,
  div.info-sub-navigation,
  div.intrams-navigation-group:hover div.intrams-sub-navigation,
  div.info-navigation-group:hover div.info-sub-navigation,
  input#intrams-dropdown-active:checked ~ div.intrams-sub-navigation,
  input#info-dropdown-active:checked ~ div.info-sub-navigation{
    display: none !important;
  }

  label.open-sidebar-button, label.close-sidebar-button{
    display: block;
  }

  label.open-sidebar-button{
    display: flex;
    justify-content: center;
    align-items: center;
    order: 1;
    cursor: pointer;
    z-index: 21;
  }

  #sidebar-active:checked ~ div.links-container{
    right: 0;
  }

  #sidebar-active:checked ~ #overlay{
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0; 
    z-index: 9;
  }

  div.mobile-intrams-sub-navigation, div.mobile-info-sub-navigation{
    flex-direction: column;
    width: 100%;
    padding-left: 20px;
  }

  input#info-dropdown-active:checked ~ div.mobile-info-sub-navigation,
  input#intrams-dropdown-active:checked ~ div.mobile-intrams-sub-navigation{
    display: flex;
  }

  div.intrams-navigation-group:hover svg.dropdown-icon,
  div.info-navigation-group:hover svg.dropdown-icon{
    transform: rotate(0deg);
  }

  input#intrams-dropdown-active:checked ~ div.sup-navigation svg.dropdown-icon,
  input#info-dropdown-active:checked ~ div.sup-navigation svg.dropdown-icon{
    transform: rotate(180deg);
  }

  a.sub-navigation-link{
    padding: 0;
    padding-left: 15px;
    padding-top: 10px;
  }

  section.settings-menu-panel{
    width: min(430px, 94vw);
  }
}