body.modal-open {
  overflow: hidden;
}

/* Removing until it's done */
.setting-card a.edit,
.sign-in-history a {
  display: none;
}

.account-wrapper {
  display: grid;
  column-gap: 48px;
  margin-top: 80px;
  color: var(--text-secondary);
}

/* Account settings sidebar */
.account-sidebar .user {
  text-align: center;
  margin: 55px auto;
  width: fit-content;
}
.account-sidebar .user .miiname {
  font-size: 1.2rem;
  color: var(--text);
  margin: 8px 0 4px;
}
.account-sidebar .user .username {
  margin: 0;
}
.account-sidebar .user .tier-name {
  margin: 12px 0;
  line-height: 1.2em;
  border-radius: 1.2em;
  border-width: 2px;
  border-style: solid;
  padding: 4px 16px;
}
.account-sidebar .user .tier-level-0 {
  background: #2a2f50;
  color: var(--text-secondary);
  border-color: #383f6b;
}
.account-sidebar .user .tier-level-1 {
  background: rgba(255, 132, 132, 0.2);
  color: #FF8484;
  border-color: rgba(255, 132, 132, 0.8);
}
.account-sidebar .user .tier-level-2 {
  background: rgba(89, 201, 165, 0.3);
  color:#59c9a5;
  border-color: #59c9a5;
}
.account-sidebar .user .tier-level-3 {
  background: rgba(202, 177, 251, 0.3);
  color:#cab1fb;
  border-color: #cab1fb;
}

.account-sidebar .user .mii {
  width: 128px;
  height: 128px;
  border-radius: 100%;
  background: var(--btn-secondary);
}
.account-sidebar .buttons a {
  display: flex;
  flex-flow: column;
  align-items: center;
  padding: 20px 24px;
  background: #383f6b;
  margin: 20px 0 0;
  text-decoration: none;
}
.account-sidebar .buttons a svg {
  margin-bottom: 16px;
}
.account-sidebar .buttons a p.caption {
  margin: 0;
}
.account-sidebar .buttons p.cemu-warning {
  margin: 4px 0 0;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Settings */
.settings-wrapper {
  display: grid;
  grid-column-start: 2;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}
.settings-wrapper a {
  color: #9d6ff3;
  text-decoration: none;
  font-weight: bold;
}
.settings-wrapper a:hover {
  text-decoration: underline;
}
.settings-wrapper h2.section-header {
  margin-top: 40px;
  grid-column: 1 / 3;
  color: var(--text);
}

.setting-card {
  display: grid;
  grid-template-rows: 35px repeat(2, auto);
  row-gap: 24px;
  position: relative;
  border-radius: 10px;
  background: #2a2f50;
  padding: 48px 60px;
}
.setting-card * {
  margin: 0;
}
.setting-card .edit {
  color: var(--text-secondary);
  background: #383f6b;
  border-radius: 100%;
  position: absolute;
  top: 42px;
  right: 48px;
  width: 24px;
  height: 24px;
  padding: 12px;
}
.setting-card .edit:hover {
  background: #383f6b;
  color: var(--text);
}

.setting-card .header {
  color: var(--text);
}

.setting-card .setting-list {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 24px;
  list-style: none;
  padding: 0;
}
.setting-card .setting-list p.label {
  color: var(--text);
  margin-bottom: 4px;
}

fieldset {
  position: relative;
  height: min-content;
  padding: 0;
  border: none;
}

.setting-card .server-selection {
  display: flex;
  border-radius: 5px;
  overflow: hidden;
  background: #383f6b;
}
.setting-card .server-selection input {
  display: none;
}
.server-selection input + label {
  display: flex;
  flex-flow: column;
  align-items: center;
  flex: 50%;
  color: var(--text-secondary);
  padding: 40px;
  justify-content: space-between;
  cursor: pointer;
}
.server-selection input + label h2 {
  margin-top: 12px;
  color: var(--text-secondary);
}
.server-selection input:checked + label,
.server-selection input:checked + label h2 {
  background: var(--theme);
  color: var(--text);
}

.setting-card #link-discord-account {
  width: 100%;
  padding: 12px 48px;
  cursor: pointer;
  background: #383f6b;
}

.setting-card button {
  width: 100%;
  height: fit-content;
  padding: 12px 48px;
  align-self: flex-end;
  cursor: pointer;
  background: #383f6b;
}
.setting-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background: #383f6b;
  padding: 12px;
  margin: 4px;
  margin-left: 0;
  border-radius: 4px;
  vertical-align: -65%;
}
.setting-card input[type="checkbox"]:checked {
  background: no-repeat center/contain url(../images/check.svg), var(--theme);
}

.setting-card.span-both-columns {
  grid-column: 1 / span 2;
}

@keyframes banner-notice {
  0% {
    top: -150px;
  }
  20% {
    top: 35px;
  }
  80% {
    top: 35px;
  }
  100% {
    top: -150px;
  }
}
.banner-notice {
  display: flex;
  justify-content: center;
  position: fixed;
  top: -150px;
  width: 100%;
  animation: banner-notice 5s;
}
.banner-notice div {
  padding: 4px 36px;
  border-radius: 5px;
  z-index: 3;
}
.banner-notice.success div {
  background: #37a985;
}
.banner-notice.error div {
  background: #a9375b;
}

div.online-files-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);

  z-index: 10;
}
div.online-files-modal-wrapper.hidden {
  display: none;
}
div.online-files-modal {
  background: #393b5f;
  padding: 48px;
  border-radius: 8px;
  text-align: left;
  width: min(660px, 90%);
  box-sizing: border-box;
}

div.online-files-modal h1 {
  margin-top: 0;
}
p.online-files-modal-caption {
  color: var(--text-secondary);
}
p.online-files-modal-caption span {
  color: var(--text);
}

.online-files-modal-button-wrapper {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}
.online-files-modal-button-wrapper button {
  margin-left: 12px;
  width: fit-content;
}
.online-files-modal-button-wrapper button.cancel {
  background: none;
}
.online-files-modal-button-wrapper button.confirm {
  padding: 12px 24px;
}

button {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  font-family: Poppins, Arial, Helvetica, sans-serif;
  font-size: 1rem;
  height: fit-content;

  background: var(--btn);
  border: none;
  border-radius: 4px;
  padding: 12px;
  color: var(--text);
  width: 100%;

  transition: filter 300ms;
  pointer-events: all;
  cursor: pointer;
  filter: none;
}

input {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  font-family: Poppins, Arial, Helvetica, sans-serif;
  font-size: 1rem;
  background-color: black; /*change me*/
  border: none;
  border-radius: 4px;
  padding: 12px;
  color: var(--text);
  width: calc(100% - 24px);
}

input:focus {
  background-color: #4b5595;
  outline: none;
  transition: 150ms;
}

footer {
  margin-top: 80px;
}

@media screen and (max-width: 1300px) {
  .account-wrapper {
    margin: 20px 0;
  }

  .settings-wrapper {
    grid-column-start: 1;
  }

  .account-sidebar {
    margin: 0;
  }

  .account-sidebar .user .mii {
    width: 128px;
    height: 128px;
  }
}

@media screen and (max-width: 1000px) {
  .settings-wrapper {
    display: block;
    width: 100%;
  }

  .setting-card {
    margin-bottom: 24px;
  }
}

@media screen and (max-width: 550px) {
  .setting-card {
    padding: 24px;
    width: calc(100vw - 48px);
    margin-left: -5vw;
    margin-right: -2.5vw;
    border-radius: 0;
    margin-bottom: 12px;
  }
  
  .setting-card .edit {
    top: 20px;
    right: 20px;
    transform: scale(0.85);
  }

  .setting-card .server-selection {
    flex-flow: column;
  }
}

@media screen and (max-width: 350px) {
  .setting-card .setting-list {
    grid-template-columns: auto;
  }
}
