@import url('https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

/* Global Styles */

:root {

  --g10: #eee;
  --g30: #ccc;
  --g50: #aaa;
  --g60: #888;
  --g70: #666;
  --g80: #444;
  --g90: #333;

  --b05: rgb(245 250 255);
  --b10: rgb(225 240 255);
  --b15: rgb(190 225 245);
  --b20: #3e97e7;
  --b40: #375281; /* TODO: need to figure out colors here */
  --b60: #2958ab;
  --b75: #2864a0;
  --b80: #325a82;
  --b85: #32465a;
  --b90: #203241;
  --b92: #20252b;
  --b95: #202428;

  --background: #131518;
  --background2: #202428;
  --background3: linear-gradient(to right, #202428, #1c1f24);
  --backdrop-color: #4f555d40;
  --background-grid: #131518;
  --grid-small: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px' viewBox='0 0 10 10' preserveAspectRatio='xMidYMid meet' stroke-width='1px'%3E%3Cpath d='M 0 10 v -10 h 10' fill='none' stroke='%2321252b'%3E%3C/path%3E%3C/svg%3E");
  --grid-medium: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid meet' stroke-width='3px'%3E%3Cpath d='M 0 100 v -100 h 100' fill='none' stroke='%232d333c'%3E%3C/path%3E%3C/svg%3E");
  --grid-large: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000px' height='1000px' viewBox='0 0 1000 1000' preserveAspectRatio='xMidYMid meet' stroke-width='10px'%3E%3Cpath d='M 0 1000 v -1000 h 1000' fill='none' stroke='%23353d49'%3E%3C/path%3E%3C/svg%3E");
  --color: #eee;
  --color2: #eee;
  --border: #3e4650;
  --input-background: #131518;
  --input-border: #131518;
  --accent: #3987e6;
  --accent-light: #77b4ff;
  --accent-indeterminate: #3987e6aa;
  --button-primary: linear-gradient(to right, var(--b20), var(--b60));
  --button-icon-primary: var(--b20);
  --button-primary-text: #fff;
  --button-disabled: linear-gradient(to right, var(--g30), var(--g70));
  --button-delete: #e74c3c;
  --table-hover: #ffffff1a;
  --shadow: #090a0cf0;
  --shadow2: #4f555d40;
  --placeholder: var(--g60);
  --authorize-header-arrow-color: #aaa;

  --tinfo: #1c71be;
  --terror: #811e1e;
  --tsuccess: #087631;
}

.light {
  
  --background: #f3f3f3;
  --background2: #fff;
  --background3: linear-gradient(to right, #fff, #f3f3f3);
  --backdrop-color: #13151830;
  --background-grid: #fcfcfc;
  --grid-small: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px' viewBox='0 0 10 10' preserveAspectRatio='xMidYMid meet' stroke-width='1px'%3E%3Cpath d='M 0 10 v -10 h 10' fill='none' stroke='%23eee'%3E%3C/path%3E%3C/svg%3E");
  --grid-medium: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid meet' stroke-width='3px'%3E%3Cpath d='M 0 100 v -100 h 100' fill='none' stroke='%23ddd'%3E%3C/path%3E%3C/svg%3E");
  --grid-large: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000px' height='1000px' viewBox='0 0 1000 1000' preserveAspectRatio='xMidYMid meet' stroke-width='10px'%3E%3Cpath d='M 0 1000 v -1000 h 1000' fill='none' stroke='%23ccc'%3E%3C/path%3E%3C/svg%3E");
  --color: #202428;
  --color2: #eee;
  --border: #ccc;
  --input-background: #eee;
  --input-border: #ccc;
  --accent: #3987e6;
  --accent-light: #77b4ff;
  --accent-indeterminate: #3987e6aa;
  --button-primary: linear-gradient(to right, var(--b20), var(--b60));
  --button-primary-text: #fff;
  --button-disabled: linear-gradient(to right, var(--g30), var(--g70));
  --button-delete: #e74c3c;
  --table-hover: #20242826;
  --shadow: #13151820;
  --shadow2: #1315180d;
  --placeholder: var(--g60);
  --authorize-header-arrow-color: #666;

  --tinfo: #7bb3e5;
  --terror: #cf6c6c;
  --tsuccess: #5ac682;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Bai Jamjuree', sans-serif;
  font-style: normal;
  font-size: 14px;
  font-weight: 300;

  accent-color: var(--accent);

  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  &::-webkit-scrollbar-thumb {
    background-color: var(--accent);
  }
  &::-webkit-scrollbar-track {
    background-color: transparent;
  }
  
  /* Theme transition for all elements */
  transition-duration: 0.3s;
  transition-timing-function: ease;
  transition-property:
    background,
    background-color,
    background-image,
    color,
    border-color,
    box-shadow,
    opacity;

}

.mono,
code {
  font-family: monaco, 'Courier New', monospace;
}

h1, h2, h3, h4, h5, h6, p, ul, ol {
  margin: 8px 0;
}
ul, ol {
  padding-inline-start: 16px;
}

/* Lists */
ul.comma {
  display: inline;
  padding: 0;
  margin: 0;
  list-style: none;
}
ul.comma li {
  display: inline
}
ul.comma li:not(:last-child):after {
  content: ', '
}

.spacer {
  flex: auto;
}

/* Anchors */
a {
  color: var(--b20);

  cursor: pointer;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  text-align: center;
  text-decoration: none;
  /* vertical-align: middle; */
  white-space: nowrap;

  &:hover {
    opacity: .6;
  }
}
a.delete {
  color: var(--button-delete);
}

/* Buttons */
a.b,
button {
  display: inline-block;
  /* min-width: 48px;
  min-height: 48px; */
  min-width: 36px;
  min-height: 36px;
  border-radius: 12px;
  border: none;
  color: inherit;
  background: none;

  cursor: pointer;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;

  &:hover {
    opacity: .6;
  }
  &:disabled {
    cursor: not-allowed;
  }

  > * {
    vertical-align: middle;
  }
}

a.b.p,
button.p,
button.primary {
  padding: 6px 18px;

  border-radius: 24px;
  border: 0px solid transparent;
  background: var(--button-primary);

  color: var(--button-primary-text);

  &:disabled {
    background: var(--button-disabled);
  }
}

a.b.s,
button.s,
button.secondary {
  position: relative;
  padding: 6px 18px;

  border-radius: 24px;
  border: 0px solid transparent;
  background: var(--button-primary);

  background-clip: text;
  color: transparent;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 3px solid transparent;
    background: var(--button-primary);

    background-origin: border-box;
    mask: 
      linear-gradient(#000 0 0) content-box, 
      linear-gradient(#000 0 0);
    mask-composite: exclude; 
  }

  &:disabled {
    background: var(--button-disabled);
  }
}

a.b.d,
button.d,
button.delete {
  position: relative;
  padding: 6px 18px;

  border-radius: 24px;
  border: 0px solid transparent;
  background: var(--button-delete);
  background-clip: text;
  color: transparent;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid transparent;
    background: var(--button-delete);
    background-origin: border-box;
    mask: 
      linear-gradient(#000 0 0) content-box, 
      linear-gradient(#000 0 0);
    mask-composite: exclude; 
  }

  &:disabled {
    background: var(--button-disabled);
  }
}

a.b.i,
button.i,
button.icon {
  height: 36px;
  width: 36px;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  stroke: inherit;

  &::before {
    display: none;
  }

  & svg {
    height: 100%;
    width: 100%;
  }
}
a.b.i.d,
button.i.d,
button.icon.d {
  color: var(--button-delete);
  stroke: var(--button-delete);
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  border: none;
  border-radius: 6px;
  padding: 6px;
  background: transparent;
  color: inherit;
  border: 1px solid var(--g80);
  outline-color: var(--b60);

  .light & {
    border: 1px solid var(--g30);
  }

  &::placeholder {
    color: var(--placeholder);
  }
  
  &:hover {
    border: 1px solid var(--b20);
  }
}
input[type="color"] {
  padding: 0;
  border: none;
  border-radius: 0;
  cursor: pointer;
}
input[type="checkbox"],
input[type="radio"] {
  height: 20px;
  width: 20px;
  cursor: pointer;
}

/* page */
.page {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.page-nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
  padding: 0 12px;
  overflow: auto;
  background: var(--background2);
  border-bottom: 1px solid var(--border);
  box-shadow: 
    0px 0px 20px 1px var(--shadow),
    0px 0px 120px 1px var(--shadow2);
}
  .page-nav-title {
    flex: 1 0 auto;
    font-size: 18px;
    white-space: nowrap;
  }
  .page-nav-actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
  }
.page-content {
  flex: auto;
  overflow: auto;
  height: 100%;
  padding: 12px;
}

/* Structure */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  /* Some weird feature where browsers adjust the size of h1, p, etc. when
  on a mobile browser. Setting this to none fixes the issue... */
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

.authServer,
.app {
  height: 100vh;
  width: 100vw;

  color: var(--color);
  background: var(--background);
  transition-property:
    background-color,
    color,
    border-color,
    box-shadow,
    opacity,
    grid-template-columns,
    grid-template-rows;
}

/* Grid Layout */
/*
61px = 60px + 1px border
9px = 8px + 1px border
etc.
*/
.authServer,
.app-grid {
  display: grid;
  grid-template-columns: 201px 1fr;
  grid-template-rows: 61px 1fr 61px;
  grid-template-areas:
    "header header"
    "side main-content"
    "footer footer";
  overflow: hidden;

  &.collapsed-side {
    grid-template-columns: 61px 1fr;
  }
  &.collapsed {
    grid-template-columns: 0px 1fr;
    grid-template-rows: 9px 1fr 9px;
  }
}

/* Header */
.header {
  position: relative;
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  background: var(--background2);
  border-bottom: 1px solid var(--border);
  transition-property:
    background-color,
    color,
    border-color,
    box-shadow,
    opacity,
    padding;

  .collapsed & { 
    padding: 0 8px;
  }
}
.logo {
  flex: none;
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;

  .collapsed & {
    opacity: 0;
  }
}
.logo:visited {
  color: inherit;
}
.logo-icon {
  flex: none;
  width: 44px;
}
.logo-text {
  flex: none;
  font-size: 22px;

  @media (max-width: 320px) {
    display: none;
  }
}
.header-middle {
  flex: auto;
  .collapsed & {
    opacity: 0;
  }
}
.header-right {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  .collapsed & {
    opacity: 0;
  }
}
.theme-toggle {
  .collapsed & {
    opacity: 0;
  }
}
.account {
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  
  .collapsed & {
    opacity: 0;
  }
  &:hover {
    background: var(--g30);
  }
}
.header-toggle {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 6px;
  width: 100%;
  opacity: 0;
  background: var(--accent);
  cursor: n-resize;

  .collapsed & {
    cursor: s-resize;
  }

  &:hover {
    opacity: 1;
  }
}

/* Bottom-left: Sidebar */
.side {
  grid-area: side;
  position: relative;
  max-height: 100%;
  overflow: hidden;
  background: var(--background2);
  border-right: 1px solid var(--border);
  transition-property:
    background-color,
    color,
    border-color,
    box-shadow,
    opacity,
    padding;

  .collapsed & {
    padding: 0;
    border-right: none;
    opacity: 0;
  }
}
.side-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  width: 100%;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 8px;
  color: var(--color);
  text-decoration: none;
  border-radius: 8px;
}
.side-link-icon {
  flex: none;
  font-size: 24px;
  width: 28px;
  height: 28px;
  text-align: center;
}
.side-link-label {
  flex: none;
  white-space: nowrap;
  font-size: 14px;
  opacity: 1;

  .collapsed-side & {
    opacity: 0;
  }
}
.side-toggle {
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  opacity: 0;
  background: var(--accent);
  cursor: w-resize;

  .collapsed-side & {
    cursor: e-resize;
  }
  &:hover {
    opacity: 1;
  }
}

/* Bottom-right: Main content */
.main-content {
  grid-area: main-content;
  width: 100%;
  height: 100%;
  overflow: auto;

  box-shadow: 
    inset 0px 0px 20px 1px var(--shadow),
    inset 0px 0px 120px 1px var(--shadow2);
}

/* Footer */
.footer {
  position: relative;
  grid-area: footer;
  flex: none;
  display: flex;
  align-items: center;
  padding: 8px;
  background: var(--background2);
  border-top: 1px solid var(--border);
}
.footer-text {
  .collapsed & {
    opacity: 0;
  }
}
.footer-toggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  opacity: 0;
  background: var(--accent);
  cursor: s-resize;

  .collapsed & {
    cursor: n-resize;
  }
  &:hover {
    opacity: 1;
  }
}

/* View */
.view {
  padding: 8px;
  display: flex;
  flex-direction: column;
}
.view-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
  padding: 8px;
}
.view-header-title {
  flex: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
}
.view-header-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-content {
  flex: auto;
  padding: 8px;
}

/* Home */
.home-header {
  text-align: center;
  margin-bottom: 48px;
  padding: 32px 0;
}
.home-title {
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-description {
  font-size: 16px;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.home-actions {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.home-section {
  margin-bottom: 64px;
}
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-align: center;
}
.section-description {
  font-size: 16px;
  margin: 0 0 32px 0;
  text-align: center;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.action-card {
  display: block;
  background: var(--background2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow:
    0px 2px 8px 0px var(--shadow),
    0px 2px 40px 0px var(--shadow2);
  position: relative;
  overflow: hidden;
}
.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.action-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0px 8px 20px 0px var(--shadow),
    0px 8px 120px 0px var(--shadow2);
  border-color: var(--accent);
}
.action-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 16px;
  text-align: center;
}
.card-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-align: center;
}
.card-description {
  font-size: 14px;
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .action-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-title {
    font-size: 32px;
  }
  .action-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .action-card {
    padding: 24px;
  }
  .card-icon {
    font-size: 32px;
  }
}

/* UML Package */
.uml-package {
  display: contents;
}

/* Auth */
.auth {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen {
  height: 640px;
  width: 320px;
  padding: 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
  gap: 20px;

  background-color: var(--background2);
  border-radius: 8px;
  box-shadow: 
    0px 0px 20px 1px var(--shadow),
    0px 0px 120px 1px var(--shadow2);
}

.logo {
  height: 60px;
  width: 60px;
}

.title {
  text-align: center;
  font-weight: normal;
  font-size: 16px;
}

.centered {
  text-align: center;
}
.flex-auto {
  flex: auto;
}
ul.comma {
  display: inline;
  list-style: none;
}
ul.comma li {
  display: inline
}
ul.comma li:not(:last-child):after {
  content: ', '
}

/* Authorize Screen */
.authorize-header {
  display: flex;
  align-items: center;
}
.authorize-header-arrow {
  height: 20px;
  width: 48px;
  margin: 10px;
}
.authorize-header-description {
  text-align: center;
  margin: 0px;
}
.authorize-header-scopes {
  margin: 10px;
  text-align: center;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.form input,
.form input[type="email"],
.form input[type="password"],
.form input[type="text"] {
  width: 100%;
  height: 36px;
  padding: 10px;
  color: var(--color);
  background-color: var(--input-background);
  border: 1px solid var(--input-border);
  outline-color: var(--accent);
  border-radius: 8px;
}
.form input::placeholder,
.form input[type="email"]::placeholder,
.form input[type="password"]::placeholder,
.form input[type="text"]::placeholder {
  color: var(--placeholder);
}

.password-input {
  position: relative;
  width: 100%;

  & input,
  & input[type="password"],
  & input[type="text"] {
    padding-right: 36px;
  }
  & button {
    position: absolute;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 4px;
    border: none;
    outline-color: var(--accent);
    background: none;
  }
}

.show-password-button {
  fill: none;
  color: var(--button-icon-primary);
}

.a-identity-provider {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 36px;
  max-height: 36px;
  width: 100%;
  padding: 8px;
  border-radius: 24px;

  & img {
    position: absolute;
    left: 0;
    flex: none;
    height: 100%;
    padding: 8px;
  }
  & span {
    flex: auto;
    text-align: center;
  }
}

/* Signed In As */
.signed-in-as {
  padding: 10px;
  width: 100%;
  text-align: center;
  background-color: var(--background);
  border-radius: 8px;
}
.signed-in-as-user {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}
.signed-in-as-user-avatar {
  height: 20px;
  width: 20px;
  border-radius: 20px;
  margin-right: 6px;
}
.signed-in-as-user-name {
  font-weight: bold;
}
.signed-in-as-signout {
  margin-top: 6px;
}

/* Dialog */
.dialogbackdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: transparent;
  backdrop-filter: blur(0px);
  pointer-events: all;
  transition:
    background-color .3s ease,
    backdrop-filter .3s ease,
    color .3s ease,
    border-color .3s ease,
    box-shadow .3s ease,
    opacity .3s ease,
    display .3s ease allow-discrete;
}

.dialogbackdrop.dialogopen {
  display: block;
  background-color: var(--backdrop-color);
  backdrop-filter: blur(2px);
  @starting-style {
    background-color: transparent;
    backdrop-filter: blur(0px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.dialog {
  position: static;
  /* top: 50%;
  left: 50%; */
  transform: translateY(-50%);
  margin: 50vh auto;
  width: max-content;
  opacity: 0;
  border: none;
  border-radius: 12px;
  background: var(--background);
  color: var(--color);
  box-shadow:
    0px 0px 20px 1px var(--shadow),
    0px 0px 120px 1px var(--shadow2);
  transition:
    background-color .3s ease,
    color .3s ease,
    border-color .3s ease,
    box-shadow .3s ease,
    opacity .3s ease;

  .dialogopen & {
    opacity: 1;
    @starting-style {
      opacity: 0;
    }
  }

  /* Profile */
  &.dialog-account {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "header";
    gap: 10px;
    padding: 18px;
  }
  .dialog-account-image {
    text-align: center;

    & img {
      box-shadow: 
        0 6px 8px 1px var(--shadow),
        0 6px 80px 1px var(--shadow2);
      height: 100px;
      width: 100px;
      border-radius: 100px;
    }
  }
  .dialog-account-name,
  .dialog-account-username {
    text-align: center;
  }
  .dialog-account-actions {
    display: flex;
    align-items: end;
    align-content: end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }

  /* Modal */
  &.modal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;

    &.bottom {
      /* bottom: 10%; */
      margin-top: 95vh;
      transform: translateY(-100%);
    }
    &.top {
      /* top: 10%; */
      margin-top: 5vh;
      transform: translateY(0%);
    }
    &.left {
      /* left: 10%; */
      margin-left: 5vw;
    }
    &.right {
      /* right: 10%; */
      margin-right: 5vw;
    }
      
    .modal-title {
      flex: none;
      text-align: center;
      font-size: 18px;
      font-weight: 600;
    }
    .modal-text1,
    .modal-text2 {
      flex: auto;
      text-align: center;
      word-break: break-word;
    }
    .modal-buttons {
      flex: none;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
    }
    .modal-button1,
    .modal-button2 {
      flex: none;
    }
  }
  
  /* VSCode */
  &.vscode {
    min-width: 100px;
    min-height: 100px;
    height: 90%;
    width: 90%;
    
    & .vscode-iframe {
      height: calc(100% - 4px);
      width: 100%;
    }
  }

  &.spinner {
    transform: none;
    height: 64px;
    width: 64px;
    background: transparent;
    box-shadow: none;
    border-top: 3px solid var(--accent);
    border-right: 3px solid transparent;
    border-radius: 50%;
    animation: spin 500ms linear infinite;
  }
}

/* Toast List */
.toast-list {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 50%;
  height: max-content;
  width: 95%;
  max-width: 800px;
  transform: translate(-50%, 0);
}

.toast {
  display: flex;
  align-items: center;
  /* width: 100%; */
  margin: 12px 0;
  padding: 12px;
  border: none;
  border-radius: 12px;
  box-shadow:
    0 6px 8px 1px var(--shadow),
    0 6px 80px 1px var(--shadow2);
  color: var(--color);
  transition-property: opacity;

  @starting-style {
    opacity: 0;
  }
}
.toast.info {
  background-color: var(--tinfo);
}
.toast.error {
  background-color: var(--terror);
}
.toast.success {
  background-color: var(--tsuccess);
}
.toast-message {
  flex: auto;
  overflow: auto;
  font-family: inherit;
}
.toast-close {
  flex: none;
  margin-left: 6px;
  font-weight: 600;
  cursor: pointer;
}

/* inputSelect */
.inputSelect {
  position: relative;
}
.inputSelect-select,
.inputSelect-select:disabled {
  position: absolute;
  height: 100%;
  width: 100%;
  padding: 6px;
  /* Hide the select */
  outline: none;
  border: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  cursor: pointer;
}
.inputSelect-select:disabled {
  cursor: not-allowed;
}
.inputSelect-label {
  position: absolute;
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 6px;
  background-color: inherit;
  /* So events pass through to the select behind it */
  pointer-events: none;
}
.inputSelect-label.disabled {
  color: var(--g50);
  -webkit-text-fill-color: var(--g50);
}
.inputSelect-label-text {
  flex: auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: inherit;
}
.inputSelect-label-arrow {
  padding-left: 6px;
  flex: none;
  font-family: inherit;
}

/* permissionsSelectorTree */
.permissionsSelectorTree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  max-height: 20px;

  & * {
    flex: none;
  }
}
.permissionsSelectorTree-label {
  display: flex;
  align-items: center;
  white-space: nowrap;
  cursor: pointer;
}
.permissionsSelectorTree-checkbox {
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin: 0 2px;
  accent-color: var(--accent);

  &.indeterminate {
    accent-color: var(--accent-indeterminate);
  }
}
.permissionsSelectorTree-line {
  stroke-width: 2px;
  stroke: var(--b60);
  /* stroke-dasharray: 2 1; */
  fill: none;
}

.permissionsSelectorTree .active {
  stroke: var(--accent);
}

/* fileDropzone */
.file-dropzone {
  border: 2px dashed var(--accent-indeterminate);
  border-radius: 8px;

  &.active {
    border-color: var(--accent);
  }
}
.file-dropzone-input {
  background: transparent;
  color: transparent;
  border-radius: 8px;
  border: none;
}
.file-dropzone-browse-button {
  display: flex;
  align-items: center;
  min-height: 48px;
  min-width: 48px;
  min-width: max-content;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  padding: 8px 24px;
  background-color: var(--button-primary);
  color: var(--button-primary-text);
  
  &:hover {
    opacity: .6;
  }
}


/* Tables */
div.table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table .table-pagination {
  flex: none;
  display: flex;
  align-items: center;
}
  .table-pagination-back,
  .table-pagination-forward {
    flex: none;
    font-size: 16px;
    font-weight: 600;
  }
  .table-pagination-info {
    flex: auto;
    padding: 2px;
    text-align: center;
    overflow: auto;
    white-space: nowrap;
  }
    .table-pagination-info-total,
    .table-pagination-info-filtered,
    .table-pagination-info-shown,
    .table-pagination-info-pageSize {
      margin: 0 8px;
    }
    .table-pagination-info-pageSize input {
      padding: 6px;
      border: none;
      border-radius: 6px;
      font-size: inherit;
      font-weight: inherit;
      font-family: inherit;
      background: none;
      color: var(--color);
    }

.table .table-content {
  flex: auto;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--background3);
  
  box-shadow:
    0 0 6px 1px var(--shadow),
    0 0 20px 1px var(--shadow2);
}

.table table,
table.table {
  table-layout: fixed;
  border-spacing: 0;
  /* border-collapse: collapse; */
  height: fit-content;
  width: 100%;
  min-width: 800px;
}
table.table {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 
    0 0 6px 1px var(--shadow),
    0 0 20px 1px var(--shadow2);
}

.table :is(th, td) {
  padding: 6px;
  /* overflow: hidden; breaks the sticky columns */
  overflow: clip;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
}
.table th {
  height: 36px;
}

.table tr.table-header {
  position: sticky;
  /* 
  anything that is positon: relative within the table will appear above 
  without this 
  */
  z-index: 1;
  top: 0;
  /* background: var(--background3); */
  backdrop-filter: blur(8px);

  &.table-hover {
    background: var(--table-hover);
  }
  &:hover {
    background: var(--table-hover);
  }
  & :is(th, td) span {
    position: sticky;
    left: 6px;
    font-weight: 600;
  }
}

/* .table-resize {} */
.table .table-resize-handle {
  opacity: 0;
  background: var(--color); 
  touch-action: none;

  &:hover {
    opacity: .4;
  }
}
.table .table-clickable {
  cursor: pointer;
}

.table tr.table-filter {
  position: sticky;
  /* 
  anything that is positon: relative within the table will appear above 
  without this 
  */
  z-index: 1;
  top: 36px;
  /* background: var(--background3); */
  backdrop-filter: blur(8px);
  box-shadow: 
    0 4px 4px -3px var(--shadow),
    0 10px 10px -9px var(--shadow2);

  &.table-hover {
    background: var(--table-hover);
  }
  &:hover {
    background: var(--table-hover);
  }
}
.table tr.table-filter :is(th, td) {
  padding: 0;

  &:has(input[type="checkbox"]) {
    padding: 6px;

    & input {
      vertical-align: middle;
      margin-right: 6px;
    }
    & label {
      vertical-align: middle;
      cursor: pointer;
      color: var(--placeholder);
    }
  }
}
.table tr.table-filter input:not([type="checkbox"]) {
  width: 100%;
  height: 100%;
  padding: 6px;
  border: none;
  /* border-radius: 6px; */
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  background: none;
  color: var(--color);
}

.table col {
  &.table-hover {
    background: var(--table-hover);
  }
}

.table tr {
  &:hover {
    background: var(--table-hover);
  }
}

.table-actions {
  align-items: center;

  > * {
    margin-right: 6px;
  }
}

/* Legacy - Remove when no longer in use */
.mobile-panel {
  height: 600px;
  width: 300px;
  padding: 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;

  background-color: #fff;
  border-radius: 6px;
  box-shadow: rgb(0, 0, 0, .2) 0px 6px 20px 1px;
}

/* Tabs */
.tabs {
  display: flex;
  align-items: end;
  gap: 8px;
  overflow-y: hidden;
  overflow-x: auto;
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  white-space: nowrap;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--background);
  box-shadow:
    0 0 6px 1px var(--shadow),
    0 0 20px 1px var(--shadow2);
  cursor: pointer;
}
.tab.active {
  background: var(--background2);
}
.tab-content {
  padding: 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow:
    0 0 6px 1px var(--shadow),
    0 0 20px 1px var(--shadow2);
}
.tab-content-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Identity Provider */
.identityProvider .view-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.identityProvider-icon {
  height: 40px;
  width: 40px;
  border-radius: 50%;
}
.identityProvider-name {
  font-size: 16px;
  font-weight: 600;
}

/* User */
.user .view-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.user-avatar {
  height: 40px;
  width: 40px;
  border-radius: 50%;
}
.user-name {
  font-size: 16px;
  font-weight: 600;
}

/* Group */
.group .view-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.group-name {
  font-size: 16px;
  font-weight: 600;
}
.group-filtered-user-table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;

  & td {
    padding: 6px;
  }
}

/* Client */
.client .view-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.client-image {
  height: 40px;
  width: 40px;
}
.client-name {
  font-size: 16px;
  font-weight: 600;
}
.client-redirect-uri-tests {
  white-space: nowrap;
  padding-right: 12px;
}
.client-redirect-uri-results-container {
  position: relative;
  left: -18px;
  align-self: start;
  padding: 6px 6px 16px 6px;
  overflow: hidden;
  max-height: 100%;
  height: 100%;
}
.client-redirect-uri-results {
  table-layout: fixed;
  border-collapse: collapse;
}
.client-redirect-uri-result {
  & td div {
    max-height: 16px;
    font-weight: 600;
  }
  &.valid {
    color: var(--tsuccess);
  }
  &.invalid {
    color: var(--terror);
  }
  &.unknown {
    color: var(--tinfo);
  }
}

.client-image-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.client-origin-list {
  & td {
    padding: 6px;
  }
}

/* Form Details */
.form-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  /* background-color: var(--content-background-color); */
  background: var(--background);
  box-shadow:
    0 0 6px 1px var(--shadow),
    0 0 20px 1px var(--shadow2);

  &.horizontal {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: auto;
  }
}
.form-field {
  display: flex;
  align-items: center;
  gap: 20px;
}

.form-label {
  flex: none;
  min-width: 100px;
}
.form-value {
  flex: auto;
  padding: 6px;
}
.form-input {
  padding: 6px;
  background: transparent;
  outline: none;
  field-sizing: content;
  min-width: 160px;
  max-width: 800px;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  color: var(--color);
  background-color: var(--input-background);
  outline-color: var(--accent);
  border: 1px solid var(--input-border);
  border-radius: 6px;

  &[type="checkbox"] {
    min-width: 16px;
    width: 16px;
    height: 16px;
    margin: 0 2px;
    accent-color: var(--accent);
  }
  &[type="color"] {
    height: 48px;
    width: 48px;
    max-width: 48px;
    min-width: 48px;
  }

  &::placeholder {
    color: var(--placeholder);
  }
}
textarea.form-input {
  field-sizing: fixed;
  width: 240px;
  height: 120px;
}

/* Status */
.status {
  display: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status.new {
  display: inline-block;
  background: var(--accent);
}
.status.changed {
  display: inline-block;
  background: var(--accent);
}
.status.deleted {
  display: inline-block;
  background: var(--button-delete);
}