/*
 * This is a separate stylesheet relied on by apps.
 * Unlike the main stylesheet, this one will be loaded by sandboxed
 * applications.
 */
:root {
  --window-active-header: #0f4774;
  --window-active-header-text: #ffffff;
  --window-inactive-header: #737373;
  --window-inactive-header-text: #ffffff;
  --window-sidebar-bg: #e0e0e0;
  --window-text-color: #333;
  --window-content-bg: #ffffff;
  --window-line-color: #ddd;
  --app-primary-color: #3498db;
  --app-primary-bg: #efefef;
  --sidebar-hover-bg: "#c8c8c8";
  --sidebar-selected-bg-color: #3498db;
  --sidebar-selected-text-color: #ffffff;
  --font-size: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  overflow: hidden;
  font-family:
    Avenir, "Helvetica Neue", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: var(--font-size);
  color: var(--window-text-color);
}

a {
  color: var(--window-text-color);
}

p {
  margin: 1.12em 0;
  line-height: 30px;
  font-size: 1.1em;
}

.sandbox {
  scrollbar-color: var(--window-inactive-header) var(--window-content-bg);
  container-type: size;
  container-name: window;
}

.sandbox.active {
  scrollbar-color: var(--window-active-header) var(--window-content-bg);
}

.w-container {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: auto;
}

.w-content {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
  background-color: var(--window-content-bg);
  color: var(--window-text-color);
  width: 100%;
  height: 100%;
}

.w-content:focus {
  outline: none;
}

.w-content-centered {
  max-width: 835px;
  margin: auto;
}

.w-tools {
  background-color: var(--window-sidebar-bg);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  padding: 5px;
  gap: 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--window-line-color);
  scrollbar-color: var(--sidebar-hover-bg) var(--window-sidebar-bg);
  scrollbar-width: thin;
}

.w-tool-btn {
  cursor: pointer;
  color: var(--window-text-color);
}

.w-tool-btn:hover {
  color: var(--sidebar-selected-bg-color);
}
.w-tool-btn:focus {
  /* outline:none; */
  /*  color: var(--sidebar-selected-bg-color); */
}

.w-tool-btn.disabled {
  cursor: auto;
  color: var(--sidebar-hover-bg);
}

.w-tool-title {
  font-size: 0.9em;
  padding: 0 2px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  white-space: normal;
  max-width: 6em;
  width: min-content;
  overflow: hidden;
}

.no-tool-title .w-tool-title {
  display: none;
}

.w-content ul,
ol {
  padding-left: 20px;
}

.w-content li {
  line-height: 2.2em;
  font-size: 1.1em;
  margin-top: 10px;
  margin-bottom: 10px;
}

.w-content h2 {
  font-weight: normal;
}

.w-content h3 {
  margin: 25px 0px 15px 0px;
}

.w-content .group-header {
  margin-bottom: 5px;
  overflow: hidden;
}

.app-title {
  font-size: 175%;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--window-line-color);
}

.quickLinks {
  margin-top: 17px;
}
.quicklink-link {
  margin: 7px;
}
.quicklink-link:hover {
  color: var(--app-primary-color);
}
.quicklink-img,
.quicklink-img svg {
  height: 22px;
  width: auto;
}
.subtitle {
  font-size: 1.6em;
  font-style: italic;
  margin-top: 35px;
}
.asterisk {
  font-size: 0.8em;
  font-style: italic;
}
.separator {
  margin: 24px 0px;
  text-align: center;
  font-size: 1.5em;
  border-bottom: 1px solid var(--window-line-color);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-left-color: var(--app-primary-color);
  animation: spin 1s linear infinite;
}

.spinner-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -20px;
  margin-top: -20px;
}

.context-menu {
  position: absolute;
  flex-direction: column;
  /* background: var(--window-sidebar-bg); */
  background: var(--window-content-bg);
  color: var(--window-text-color);
  /* border: 1px solid var(--window-line-color); */
  border: 0;
  border-radius: 3px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  z-index: 2000;
  max-height: 100%;
  overflow: auto;

  /* transform: scale(0.9) translateY(-5px); */
  /* opacity: 0; */
  /* transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1); */
  transform: scale(0.8);
  opacity: 0;
  transition:
    transform 0.15s ease-out,
    opacity 0.15s ease-out;
  transform-origin: top left; /* Adjust based on position */
}

.context-icon {
  color: var(--app-primary-color);
}

.context-menu.show {
  transform: scale(1) translateY(0);
  opacity: 1;
  transform: scale(1);
  opacity: 1;
}

.context-menu-item {
  padding: 10px 10px;
  cursor: pointer;
  max-width: 250px;
}

.context-menu-item:hover {
  /* background: var(--sidebar-hover-bg); */
  background: var(--window-active-header);
  color: var(--window-active-header-text);
}

.context-menu-item:hover .context-icon {
  color: var(--window-active-header-text);
}

.btn {
  background-color: var(--app-primary-bg);
  color: var(--window-text-color);
  border: 1px solid var(--window-line-color);
  border-radius: 4px;
  padding: 10px 20px;
  font-size: var(--font-size);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: scale(1);
  box-shadow: 0 3px 5px rgba(2, 0, 0, 0.15);
}

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

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  width: 100%;
  max-width: 400px;
}

.w-sidebar {
  min-width: 160px;
  max-width: 160px;
  background-color: var(--window-sidebar-bg);
  border-right: 1px solid var(--window-line-color);
  overflow-y: auto;
}

.w-sidebar-item {
  padding: 15px;
  cursor: pointer;
  transition:
    background-color 0.25s,
    color 0.25s;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: break-word;
  word-break: break-word;
}

.w-sidebar-item:hover {
  background-color: var(--sidebar-hover-bg);
}
.w-sidebar-item:focus {
  outline: none;
  background-color: var(--sidebar-hover-bg);
}
.w-sidebar-item.active {
  background-color: var(--sidebar-selected-bg-color);
  color: var(--sidebar-selected-text-color);
}

.w-sidebar-icon {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.w-group {
  margin-bottom: 30px;
}

.w-shadow-color-input {
  visibility: hidden;
  position: absolute;
  margin-left: -165px;
  margin-top: 45px;
}

.w-color-item {
  height: 90px;
  width: 165px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  border: 1px dashed black;
  margin: 0px 9px 9px 0px;
}

.w-color-item.selectable {
  border: 4px solid transparent;
}

.w-color-item.selectable.img-empty {
  border: 4px solid var(--app-primary-bg);
  /* background: repeating-linear-gradient( */
  /*    45deg, */
  /*    var(--app-primary-bg) 0px, */
  /*    var(--app-primary-bg) 20px, */
  /*    transparent 20px, */
  /*    transparent 40px */
  /*  ); */
}

.w-color-item:hover {
  transform: scale(1.1);
}

.w-color-item.selected {
  border-color: var(--app-primary-color);
}

.w-color-item.selectable.img-empty.selected {
  border-color: var(--app-primary-color);
}

.w-color-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.w-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
}

.w-small-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 450px;
  min-height: 56px;
  padding: 10px 0px;
}

.w-small-opt-desc {
  padding-right: 10px;
}

.w-small-opt.disabled {
  color: var(--app-primary-bg);
}

.w-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  min-width: 48px;
  height: 24px;
}

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

.w-small-opt.disabled .w-switch-slider {
  background-color: var(--app-primary-bg);
}

.w-char-picker {
  border: 1px solid var(--window-line-color);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}
.w-char-picker-char {
  display: inline-block;
  font-size: 2em;
  text-align: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  line-height: 40px;
}
.w-char-picker-char:hover {
  transform: scale(1.5);
}

.w select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid var(--window-line-color);
  background-color: #f5f5f5;
}

.w-slider-container {
  width: 100%;
  min-height: 60px;
  padding: 10px 0px;
}

.w-slider-container label {
  display: block;
  margin-bottom: 5px;
}

.w-slider-with-value {
  display: flex;
  align-items: center;
  gap: 10px;
}

.w-slider {
  flex-grow: 1;
  appearance: none;
  height: 4px;
  background: var(--app-primary-bg);
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}
.w-slider:focus {
  background: var(--window-line-color);
}

.w-slider::-webkit-w-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--app-primary-bg);
  cursor: pointer;
}

.w-slider-value {
  width: 40px;
  text-align: center;
}

.dropdown-container {
  width: 100%;
  max-width: 400px;
  margin-bottom: 15px;
}

.dropdown-container label {
  display: block;
  margin-bottom: 5px;
}

.w-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--app-primary-bg);
  transition: background-color 0.4s;
  border-radius: 24px;
}

.w-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: transform 0.4s;
  border-radius: 50%;
}

input:checked + .w-switch-slider:before {
  transform: translateX(24px);
}

input:checked + .w-switch-slider {
  background-color: var(--app-primary-color);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--app-primary-color);
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--app-primary-color);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.text-input {
  width: 100%;
  margin-bottom: 10px;
  background-color: var(--app-primary-bg);
  border: 1px solid var(--window-line-color);
  color: var(--window-text-color);
  border-radius: 3px;
  padding: 0px 5px;
}

.w-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--window-content-bg);
  color: var(--window-text-color);
  border: 1px solid var(--window-line-color);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  width: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  transition:
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out;
}

.w-select:hover {
  border-color: var(--app-primary-color);
  background-color: var(--app-primary-bg);
}
.w-select:focus {
  outline: none;
  border-color: var(--window-line-color);
  background-color: var(--app-primary-bg);
}

.emphasis-focus:focus {
  outline: 2px dotted;
}

.iframe-top-layer {
  display: flex;
  height: 100%;
  width: 100%;
  position: absolute;
  background-color: #000000aa;
  justify-content: center;
  align-items: center;
}

.transparent-i-frame-top .iframe-top-layer {
  opacity: 0;
}

.window.active .iframe-top-layer {
  display: none;
}
.block-iframe .window.active .iframe-top-layer {
  display: flex;
}
.sandbox.active .iframe-top-layer {
  display: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsivity */

@container window (max-width: 550px) {
  .w-container {
    flex-direction: column;
  }
  .w-sidebar {
    display: flex;
    max-width: 100%;
  }
  .w-sidebar-item {
    text-align: center;
    text-overflow: clip;
    overflow-wrap: normal;
    word-break: normal;
    overflow: visible;
  }
}

.w-sidebar-top .w-container {
  flex-direction: column;
}

.w-sidebar-top .w-sidebar {
  display: flex;
  max-width: 100%;
}

.w-sidebar-top .w-sidebar-item {
  text-align: center;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: normal;
  overflow: visible;
}
