#semantic-model{
  margin-left: 25px;
  width: 100%;
}

#semantic-model > div{
  height: 100%!important;
}
#semantic-model ul {
    list-style: none;
    padding-left: 1.75em;    
}

#semantic-model > ul {
min-height: 120px; /*fix popup error under UL when model is not loaded and where is only one model*/
}

#semantic-model ul li.semantic-model-root {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

#semantic-model ul li {
    position: relative;
    padding-top: 3px;
    padding-bottom: 3px;
    vertical-align: middle;
}

#semantic-model ul li > * {
  min-height: 1.5em;
  padding-top: 0.25em; /*fix checkbox vertical align*/
}

#semantic-model ul li > ul {
  height: auto;
  min-width: 100%;
  max-width: 100%;
}

#semantic-model ul li > a {
    background-color: #fff;
    color: #000;
    display: inline-block;
    height: 1.5em;
    left: -25px;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 1.5em;
    top: 5px;
}

#semantic-model ul li > a.plus {
    color: #fff;
    background: url(../img/list_navigator.png?r=iv.02);
    background-position: 9px 3px;
    background-repeat: no-repeat;
}

#semantic-model ul li > a.minus {
    color: #fff;
    background: url(../img/list_navigator.png?r=iv.02);
    background-position: 8px -13px;
    background-repeat: no-repeat;
}

#semantic-model ul li > a:active {
    top: 6px;
}

#semantic-model ul li > span:hover {
    color:#607BB8;
    cursor: pointer;
}

/* checkbox */
#semantic-model ul li > input[type="checkbox"] {
  margin: 0 3px;
  padding: 0;
}

#semantic-model ul li > span:not(.state) {
    display: inline-block;
    padding-left: 2px;
    max-width: calc(100% - 90px);
}

#semantic-model ul li > .name {
    line-height: 16px;
    vertical-align: top;
}

#semantic-model .highlighted-node {
    color: #607BB8;
    font-weight: bold;
    padding-left: 1px;
    padding-right: 5px;
}

/* Base State Styles */
#semantic-model ul li > .state {
  display: inline-block;
  position: relative;
  width: 16px;
}

#semantic-model ul li > .state .state-container,
#semantic-model ul li > .state.error .error-container,
#semantic-model ul li > .state.warning .warning-container {
  position: relative;
  display: inline-block;
  width: 16px;
}

#semantic-model ul li > .state .state-icon,
#semantic-model ul li > .state.error .error-icon,
#semantic-model ul li > .state.warning .warning-icon {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

#semantic-model ul li > .state .state-popup,
#semantic-model ul li > .state.error .error-popup,
#semantic-model ul li > .state.warning .warning-popup {
  position: absolute;
  top: calc(100% - 1px);
  left: -1px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  border-radius: 4px;
  padding: 8px 12px;
  width: 220px;
  z-index: 10;
  display: none;
  color: #333;
  font-size: 12px;
  margin-top: 0;
  pointer-events: auto;
}

#semantic-model ul li > .state .state-popup:before,
#semantic-model ul li > .state.error .error-popup:before,
#semantic-model ul li > .state.warning .warning-popup:before {
  content: '';
  position: absolute;
  top: -5px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid #ddd;
  border-top: 1px solid #ddd;
  transform: rotate(45deg);
}

#semantic-model ul li > .state .state-popup.visible,
#semantic-model ul li > .state .state-container:hover .state-popup,
#semantic-model ul li > .state.error .error-popup.visible,
#semantic-model ul li > .state.error .error-container:hover .error-popup,
#semantic-model ul li > .state.warning .warning-popup.visible,
#semantic-model ul li > .state.warning .warning-container:hover .warning-popup {
  display: block;
}

/* Error State - Only extends base state with error-specific styles */
#semantic-model ul li > .state.error {
  color: #c53030;
}

/* Warning State - Only extends base state with warning-specific styles */
#semantic-model ul li > .state.warning {
  color: #e6a23c;
}

/* Loading State */
#semantic-model ul li > .state.loading {
  width: 16px;
  height: 16px;
  display: inline-block;
  position: relative;
}

#semantic-model ul li > .state.loading::after {
  content: '';
  position: absolute;
  right: 0;
  width: 16px;
  height: 16px;
  border: 2px solid #cccccc;
  border-top-color: #666666;
  border-radius: 50%;
  animation: semantic-loading 0.8s linear infinite;
}

/* Loading Animation */
@keyframes semantic-loading {
  to {
    transform: rotate(360deg);
  }
}

/* Loading Container for Semantic Model */
.semantic-model-root .loading-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 5;
}

.semantic-model-root .loading-container .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #cccccc;
  border-top-color: #666666;
  border-radius: 50%;
  animation: semantic-loading 0.8s linear infinite;
}

#semantic-model ul li > .state.warning .warning-popup ul {
  margin: 8px 0 0 0;
  padding-left: 18px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 12px;
  color: #b26a00;
}
#semantic-model ul li > .state.warning .warning-popup ul li {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}