/* DARK MODE SWITCH */
.dark-mode-toggle {
  cursor: pointer;
  position: absolute;
  top: 24px;
  right: 24px;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 50%;
  color: var(--font-color-primary);
}

.dark-mode-toggle:hover {
  background-color: var(--elevation-background);
}

.dark-mode-toggle i {
  font-size: 1.25rem;
}

body .dark-mode-toggle .moon {
  display: none;
}

body .dark-mode-toggle .sun {
  display: block;
}

body.dark .dark-mode-toggle .moon {
  display: block;
}

body.dark .dark-mode-toggle .sun {
  display: none;
}

/* Switch */
.switch-toggle {
  position: relative;
  display: block;
  margin-top: 6px;
  cursor: pointer;
  width: 50px;
  height: 25px;
  border-radius: 25px;
  background-color: var(--elevation-background);
}

.switch-toggle input {
  position: relative;
  top: 4px;
  left: 4px;
  z-index: -1;
}

.switch-toggle div {
  position: absolute;
  border-radius: 50%;
  background-color: #9994;
  transition: 0.1s ease;
}

.switch-toggle input:focus + div {
  outline: 1;
}

.switch-toggle input:checked + div {
  left: 28px;
  background-color: #999f;
}

.switch-toggle.outer div {
  width: 16px;
  height: 16px;
  top: 4px;
  left: 5px;
}

@media (max-width: 768px) {
  .dark-mode-toggle {
    right: 10px;
  }
}

/* POPUP, DRAW AND PDF-PREVIEW  */
.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #000;
  z-index: 999999;
  color: #ddd;
  padding: 100px;
  display: none;
}

.popup-container.show {
  display: block;
}

.popup-container .close-button {
  position: fixed;
  top: 0px;
  right: 0px;
  padding: 20px 30px;
  cursor: pointer;
  color: #ddd;
  background-color: transparent;
  border: none;
  font-size: 24pt;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-container .close-button:hover {
  color: #fff;
  transition: color 0.5s ease;
}

.popup-container .close-button i {
  font-size: 24pt;
}

#diagram-canvas {
  cursor: url('../images/favicon-32x32-3.png'), crosshair;
}

/* Update button styles */
button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

button i {
  font-size: 1rem;
}

/* Update close button styles */
.popup-container .close-button {
  position: fixed;
  top: 0px;
  right: 0px;
  padding: 20px 30px;
  cursor: pointer;
  color: #ddd;
  background-color: transparent;
  border: none;
  font-size: 24pt;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-container .close-button i {
  font-size: 24pt;
}

/* Update output close button */
.output .close-button {
  position: absolute;
  right: -3px;
  top: -11px;
  border-radius: 100%;
  padding: 8px;
  width: 32px;
  height: 32px;
  background-color: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.output .close-button i {
  font-size: 14px;
}

/* Update download image button */
.download-image-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-top: 10px;
  background-color: #1d1d1d;
  color: #ccc;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 15px;
  border-radius: 8px;
}

.download-image-button i {
  font-size: 1rem;
}
