/* =========================== fonts =========================== */

@font-face {
  font-family: "Roboto";
  src: url(./assets/fonts/Roboto-Regular.ttf);
  font-weight: 400;
}

@font-face {
  font-family: "Roboto";
  src: url(./assets/fonts/Roboto-Medium.ttf);
  font-weight: 500;
}

@font-face {
  font-family: "Roboto";
  src: url(./assets/fonts/Roboto-Bold.ttf);
  font-weight: 600;
}

/* =========================== common =========================== */

* {
  font-family: "Roboto";
}

body {
  margin: 0px;
  background-color: #D5DBE1;
}

/* =========================== preload =========================== */

.preload {
  width: 0px;
  height: 0px;
  overflow: hidden;
  pointer-events: none;
}

.preload div[class] {
  display: block !important;
  pointer-events: none !important;
  width: 0px !important;
  height: 0px !important;
  padding: 0px !important;
  margin: 0px !important;
}

/* =========================== layout =========================== */

#app {
  margin: 0px;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100vh;
}

.container {
  background-color: #FFFFFF;
  width: calc(100vw - 100px);
  max-width: 1000px;
  height: 700px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 20px 30px #b2bac3;
  margin-top: calc(50vh - 350px);
}

@media (max-height: 780px) {
  .container {
    margin: 51px auto;
  }

  #app {
    height: auto;
  }
}

.section {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: opacity 0.15s;
  border: none;
  margin: 0px;
}

.section.primary {
  background-color: #FFFFFF;
  padding: 82px 90px;
}

.section.secondary {
  background-color: #065AD8;
  padding: 90px;
  background-image: url(./assets/images/cover.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 75% auto;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.15s;
}

.content[data-hidden] {
  display: none !important;
}

.content-grow {
  flex-grow: 1;
}

#app .section.primary {
  background-image: none;
}

#app[data-spinner] .section.primary {
  background-image: url(./assets/images/spinner.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40px auto;
}

#app[data-spinner] .section.primary .content {
  transition: opacity 0s;
  opacity: 0;
}

#app[data-spinner] .section.primary * {
  visibility: hidden;
}

@media (max-width: 1060px) {
  .section {
    padding: 70px 60px !important;
  }
}

@media (max-width: 950px) {
  .section.secondary {
    display: none !important;
  }

  .container {
    max-width: 500px;
  }
}

@media (max-width: 510px) {
  body {
    background-color: #FFF;
  }

  #app {
    display: block;
    width: auto;
    height: auto;
  }

  .container {
    box-shadow: none;
    width: auto;
    height: auto;
    max-width: none;
    margin: auto;
  }

  .section {
    padding: 30px !important;
    width: auto;
  }

  #app[data-spinner] .section.primary {
    background-position: center 200px;
  }
}

/* =========================== alert =========================== */

.alert {
  border-radius: 4px;
  display: flex;
  padding: 12px;
  font-size: 14px;
  fill: currentColor;
  align-items: center;
  gap: 5px;
}

.alert.info {
  background-color: #00cc9944;
  color: #0a8667;
}

.alert.error {
  background-color: #ff330033;
  color: #cf3008;
}

.alert-message {
  flex-grow: 1;
  font-size: 13px;
}

.alert-close {
  padding: 0px;
  margin: 0px;
  border: none;
  outline: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 17px;
  height: 17px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 17px auto;
}

.alert.info .alert-close {
  background-image: url(./assets/images/buttons/close_info.svg);
}

.alert.error .alert-close {
  background-image: url(./assets/images/buttons/close_error.svg);
}

/* =========================== heading =========================== */

.heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heading-logo {
  height: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: opacity 0.15s;
}

.heading-logo::before {
  content: "";
  display: inline-block;
  background-image: url(./assets/images/logo.svg);
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.heading-logo::after {
  content: "DNJS Web Application Network";
  color: #065AD8;
  font-weight: 700;
  font-size: 14px;
  padding-top: 2px;
}

.heading-title {
  font-size: 26px;
  font-weight: 600;
  color: #092040;
  user-select: none;
}

.heading-description {
  font-size: 13px;
  color: #747c93;
  font-weight: 400;
  user-select: none;
  padding-bottom: 15px;
}

/* =========================== question =========================== */

.question {
  font-size: 13px;
  color: #747c93;
  font-weight: 400;
  user-select: none;
  padding-bottom: 15px;
}

.question[data-align="right"] {
  display: flex;
  justify-content: end;
  margin: 2px 0px;
}

.question[data-align="center"] {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 8px;
}

.question[data-align="left"] {
  padding: 0px;
}

.question-link {
  display: inline-block;
  color: #2563EB;
  font-weight: 500;
  cursor: pointer;
  padding: 0px;
  margin: 0px;
  border: none;
  background-color: transparent;
  outline: none;
}

.question-link:hover {
  text-decoration: underline;
}

.question-link:disabled {
  opacity: 0.6;
  cursor: default;
  text-decoration: none;
  filter: grayscale(60%);
}

/* =========================== sso =========================== */

.sso {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.sso-button {
  flex-grow: 1;
  flex-shrink: 0;
  width: calc(100% / 2 - 10px);
  height: 40px;
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  box-shadow: 0px 1px 2px #eef3fa;
  cursor: pointer;
  font-weight: 500;
  color: #092040;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  outline: 2px solid transparent;
}

.sso-button:hover {
  background-color: #fafcff;
  border: 1px solid #065AD8;
}

.sso-button:focus {
  outline: 1px solid #065AD8;
  background-color: #e9f2ff;
  border: 1px solid #065AD8;
}

.sso-button:active {
  background-color: #cedff5 !important;
}

.sso-button.google::after {
  content: "Google";
}

.sso-button.github::after {
  content: "GitHub";
}

.sso-button::before {
  width: 16px;
  height: 16px;
  content: "";
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 16px;
  overflow: hidden;
}

.sso-button.google::before {
  background-image: url(./assets/images/sso/google.svg);
  background-size: 30px auto;
}

.sso-button.github::before {
  background-image: url(./assets/images/sso/github.svg);
  background-size: 16px auto;
}

.sso-button:disabled {
  background-color: #00000006;
  filter: grayscale(60%);
  cursor: default;
  opacity: 0.6;
}

/* =========================== separator =========================== */

.separator {
  display: flex;
  font-size: 13px;
  color: #747c93;
  font-weight: 400;
  user-select: none;
  display: flex;
  white-space: nowrap;
  align-items: center;
  gap: 10px;
  color: #64748B;
  margin: 12px 0px;
}

.separator::before,
.separator::after {
  content: "";
  height: 1px;
  width: 40%;
  background-color: #e0eaf2;
}

/* =========================== action =========================== */

.action {
  height: 40px;
  background-color: #065AD8;
  border: 1px solid #054AB3;
  border-radius: 4px;
  cursor: pointer;
  color: #FFF;
  margin: 10px 0px;
  transition: all 0.15s;
  user-select: none;
}

.action:focus {
  outline: 1px solid #065AD8;
}

.action:active {
  box-shadow: inset 0px 0px 10px #0003;
}

.action:disabled {
  opacity: 0.6;
  cursor: default;
  filter: grayscale(60%);
}

/* =========================== text input =========================== */

.input {
  height: 38px;
  padding: 0px 20px 0px 38px;
  border-radius: 4px;
  background-color: #FAFBFE;
  border: 1px solid #E2E8F0;
  margin: 2px 0px;
  transition: all 0.15s;
  background-repeat: no-repeat;
  background-position: 10px 10px;
  background-size: 18px auto;
}

.input::placeholder {
  user-select: none;
}

.input:focus,
.input:-webkit-autofill:focus {
  outline: 1px solid #065AD8;
  background-color: #e9f2ff;
  border: 1px solid #065AD8;
}

.input.name {
  background-image: url(./assets/images/inputs/name.svg);
}

.input.email {
  background-image: url(./assets/images/inputs/email.svg);
}

.input.password {
  background-image: url(./assets/images/inputs/password.svg);
}

.input.description {
  background-image: url(./assets/images/inputs/description.svg);
  padding: 11px 20px 11px 38px;
  height: 62px;
  resize: none;
}

.input:disabled {
  opacity: 0.6;
  background-color: #0000000A;
  filter: grayscale(60%);
}

/* =========================== profile =========================== */

.profile {
  padding: 5px 10px 5px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 220px;
  background-color: #1111;
  background-image: url(./assets/images/profile/avatar.svg);
  background-size: 60px auto;
  background-position: center;
  background-repeat: no-repeat;
  border: 5px solid #c0c0c0;
  margin-bottom: 10px;
  overflow: hidden;
}

.profile-avatar[data-active] {
  background-size: cover !important;
  border: 5px solid #FFF;
  box-shadow: 0px 0px 3px 2px #0001;
}

.profile-avatar-upload {
  width: 120px;
  height: 120px;
  border-radius: 120px;
  cursor: pointer;
  transition: all 0.2s;
  background-image: url(./assets/images/profile/upload.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 35px;
  background-color: #0004;
  opacity: 0;
  border: none;
  outline: none;
  padding: 0px;
  margin: 0px;
}

.profile-avatar-upload:not(:disabled):hover {
  opacity: 1;
}

.profile-avatar-upload:not(:disabled):active {
  background-color: #0006;
}

.profile-avatar-upload:disabled {
  cursor: default;
}

.profile-avatar.large {
  width: 200px;
  height: 200px;
  margin-bottom: 0px;
  background-size: 100px auto;
}

.profile-data {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 20px;
  font-weight: 500;
  color: #000D;
  max-width: 100%;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-email {
  font-size: 12px;
  color: #0004;
  font-weight: 500;
  font-style: italic;
  text-align: center;
}

.profile-description {
  font-size: 13px;
  color: #0006;
  text-align: center;
  font-weight: 500;
  padding: 0px 10px;
  overflow: hidden;
  line-height: 15px;
  max-height: 30px;
  max-width: 280px;
  text-overflow: ellipsis;
}

.profile-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.profile-button {
  flex-grow: 1;
  flex-shrink: 0;
  width: 110px;
  height: 35px;
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  box-shadow: 0px 1px 2px #eef3fa;
  cursor: pointer;
  font-weight: 500;
  color: #092040;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  outline: 2px solid transparent;
}

.profile-button.edit,
.profile-button.upload {
  background-color: #065AD808;
  border: 1px solid #065AD8;
}

.profile-button.logout,
.profile-button.remove {
  background-color: #e6000008;
  border: 1px solid #e60000;
}

.profile-button.edit:focus,
.profile-button.upload:focus {
  outline: 1px solid #065AD8;
  border: 1px solid #065AD8;
}

.profile-button.logout:focus,
.profile-button.remove:focus {
  outline: 1px solid #e60000;
  border: 1px solid #e60000;
}

.profile-button.edit:active,
.profile-button.upload:active {
  background-color: #cedff5 !important;
}

.profile-button.logout:active,
.profile-button.remove:active {
  background-color: #e6000017 !important;
}

.profile-button.edit::after {
  content: "Edit Profile";
  color: #065AD8;
}

.profile-button.logout::after {
  content: "Logout";
  color: #e60000;
}

.profile-button.upload::after {
  content: "Upload";
  color: #065AD8;
}

.profile-button.remove::after {
  content: "Remove";
  color: #e60000;
}

.profile-button::before {
  width: 16px;
  height: 16px;
  content: "";
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.profile-button.edit::before {
  background-image: url(./assets/images/buttons/edit.svg);
  background-size: 18px auto;
}

.profile-button.logout::before {
  background-image: url(./assets/images/buttons/logout.svg);
  background-size: 16px auto;
}

.profile-button.upload::before {
  background-image: url(./assets/images/buttons/upload.svg);
  background-size: 18px auto;
}

.profile-button.remove::before {
  background-image: url(./assets/images/buttons/remove.svg);
  background-size: 16px auto;
}

.profile-button:disabled {
  filter: grayscale(80%);
  opacity: 0.8;
  cursor: default;
}

.profile-subscription {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0px 4px 0px;
}

.profile-subscription-switch {
  appearance: none;
  outline: none;
  padding: 0px 2px 0px 24px;
  height: 18px;
  line-height: 30px;
  transition: all 0.1s ease-in-out;
  border-radius: 8px;
  overflow: hidden;
  vertical-align: top;
  margin: 0px;
  background-color: #a2a2a2;
  border: 1px solid #a2a2a2;
  display: flex;
  position: relative;
}

.profile-subscription-switch::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2px;
  top: 2px;
  background-color: #FFF;
  border-radius: 12px;
  transition: all 0.1s ease-in-out;
}

.profile-subscription-switch:checked {
  background-color: #00b359;
  border: 1px solid #00b359;
}

.profile-subscription-switch:checked::before {
  left: 12px;
}

.profile-subscription-switch:disabled {
  filter: grayscale(80%);
  opacity: 0.8;
}

.profile-subscription-text {
  font-size: 12px;
  color: #1118;
  font-weight: 600;
  padding-top: 1px;
}

/* =========================== editor =========================== */

.editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor .action {
  margin-top: 20px;
}

.editor-cols {
  display: flex;
  gap: 12px;
}

.editor-cols .action {
  width: 50%;
}

.profile .alert {
  margin-top: 20px;
}

/* =========================== error page =========================== */

.error-page {
  height: calc(100vh - 100px);
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #D5DBE1 !important;
}

.error-page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 220px;
  opacity: 0.8;
  background-color: #FFF;
  /* padding: 20px; */
  border-radius: 10px;
  box-shadow: 0px 15px 30px #b2bac3;
  overflow: hidden;
}

.error-page-icon {
  width: 120px;
  height: 120px;
  background-image: url(./assets/images/error.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100px auto;
  margin: 15px 0px;
}

.error-page-content {
  display: flex;
  text-align: center;
  flex-direction: column;
  background-color: #065AD8;
  gap: 5px;
  width: 100%;
  padding: 18px 0px;
}

.error-page-message {
  font-size: 20px;
  font-weight: 500;
  color: #FFFE;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.error-page-code {
  font-size: 12px;
  font-weight: 400;
  color: #FFFC;
}