/*added from websim*/
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/*added from websim*/

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hor_vr {
    color: #6c757d;
    width: 200px;
    padding-left: 1rem;
    font-size: 14px;
}

.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  animation: fadeIn 0.3s ease-out;
    color: black;
    font-weight: normal;
    font-size: initial;
}

.popup-overlay.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-overlay-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
    width: 100%;
    max-width: 800px;
    height: 100%;
  overflow: auto;
  animation: slideIn 0.3s ease-out;
  position: relative;
    margin-right: 10px;
}

.popup-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
    width: 100%;
    max-width: 800px;
    height: 100%;
  overflow: auto;
  animation: slideIn 0.3s ease-out;
  position: relative;
    margin-right: 10px;
}

.document-container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - var(--topbar-height) * 2);
    min-height: 80%;
    overflow: auto;
}

.tree {
    padding-left: 0;
}

.tree-container {
  padding: 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #374151;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #e5e7eb;
}

.tree-node {
  padding: 3px 0;
  position: relative;
    list-style: none;
}

.tree-content {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin: 2px 0;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
    justify-content: space-between;
}

.tree-content:hover {
  background-color: #f3f4f6;
  transform: translateX(2px);
  border-color: #d1d5db;
}

.tree-children {
  padding-left: 25px;
  position: relative;
  transition: all 0.3s ease;
}

.tree-children::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, #d1d5db 50%, transparent 0%);
  background-size: 1px 20px;
  opacity: 0.6;
}

.toggle-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 14px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  user-select: none;
  color: #6b7280;
  transition: all 0.2s ease;
  background: #ffffff;
}

.toggle-icon:hover {
  background: #f3f4f6;
  transform: scale(1.1);
  border-color: #9ca3af;
}

.collapsed .tree-children {
  display: none;
}

.collapsed .toggle-icon {
  background: #f9fafb;
}

.tree-content:active {
  transform: translateX(4px);
}

.tree-node {
  animation: fadeIn 0.3s ease-out;
}

.input-container {
  max-width: 800px;
  margin: 20px auto;
  display: flex;
  gap: 15px;
  padding: 20px;
}

#tree-selection {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.95em;
  color: #374151;
  background: #f9fafb;
  height: 46px;
  box-sizing: border-box;
}

#tree-selection:read-only {
  background: #f3f4f6;
  cursor: not-allowed;
}

.select-button {
  padding: 12px 24px;
  background-color: #0ea5e9;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  min-width: 120px;
  white-space: nowrap;
  height: 46px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select-button:hover {
  background-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.select-button:active {
  transform: translateY(1px);
}

.search-container {
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  padding-left: 40px;
  padding-right: 40px;
  font-size: 0.95em;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  color: #374151;
  transition: all 0.2s ease;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  width: 18px;
  height: 18px;
}

.clear-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 2px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: none;
}

.clear-button:hover {
  background: #d1d5db;
  color: #374151;
}

.clear-button.hidden {
  display: none;
}

.no-results {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-style: italic;
}

.highlight {
  background-color: #fef08a;
  padding: 0 2px;
  border-radius: 2px;
}

.hidden-node {
  display: none;
}

.popup-form {
    padding: 30px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #374151;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid #e5e7eb;
}
.popup-form h2 {
    margin-top: 0;
    color: #333;
}
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}
.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.form-check {
    position: relative;
    display: block;
    padding-left: 1.8rem;
    margin-bottom: 1rem;
}
.form-check-input {
    position: absolute;
    margin-top: 0.25rem;
    margin-left: -1.8rem;
    width: 1.2rem !important;
    height: 1.2rem !important;
    cursor: pointer;
    appearance: none;
    background-color: #fff;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}
.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
    color: #666;
    font-size: 0.95rem;
    padding-top: 0.2rem;
}
.form-check-input:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
    content: '';
    background-image: none;
    position: relative;
}
.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    line-height: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.form-check-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(76, 175, 80, 0.25);
    outline: none;
}
.form-check-input:hover {
    border-color: #4CAF50;
}
.form-check:hover .form-check-label {
    color: #333;
}
.close-btn {
    float: right;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}
.close-btn:hover {
    color: #333;
}

.popup-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.popup-subheader {
    padding: 1px 1.5rem 1px 1.5rem;
    display: block;
}

.popup-title {
    margin: 0;
    font-size: 1.5rem;
}
.popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}
.popup-close:hover {
    color: #2c3e50;
}

.popup-footer {
    padding: 15px 1.5rem 0px 1.5rem;
    border-top: 1px solid #e3e6f0;
    display: flex;
    justify-content: center;
    /*gap: 1rem;*/
}

.settings-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666666;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.tree-content:hover .settings-icon {
  opacity: 1;
}