.component-settings {
  position: relative;
  display: flex;
  flex-direction: column;
  display: flex;
  overflow: hidden;
  flex: 1;

  .component-header {
    flex: 0;
    padding: 20px;

    .close {
      position: absolute;
      right: 15px;
      top: 15px;
      cursor: pointer;
      path {
        fill: var(--text-inactive-color);
      }
      &:hover path{
        fill: var(--text-active-color);
      }
    }
  }

  .component-content {
    flex: 1;
    overflow: auto;
    padding: 0px 20px;
    position: relative;
  }

  .tab-headers {
    margin-top: 40px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    .tab-header {
      padding: 10px;
      display: flex;
      justify-content: center;
      cursor: pointer;
      color: var(--text-inactive-color);
      border-bottom: 2px solid transparent;
      &:hover {
        color: var(--highlight-blue);
      }
      &.active {
        border-bottom-color: var(--highlight-blue);
      }
    }
  }

  .tab {
    &:not(.active) {
      display: none;
    }
    overflow: hidden;
  }

  .uuid {
    font-family: monospace;
    margin-top: 10px;
    color: rgb(114, 114, 114);
  }

  .section {
    margin-top: 20px;
    .section-title {
      padding-bottom: 5px;
      margin-bottom: 20px;
      border-bottom: 1px solid rgb(237, 237, 237);
      display: flex;
      flex-direction: row;
    }
  }

  .input-field {
    margin-bottom: 20px;
  }

  .add-dynamic-property, .add-dynamic-relationship {
    display: inline-block;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    &:hover {
      background-color: var(--light-green);
      svg {
        fill: var(--highlight-green);
      }
    }
    svg {
      fill: var(--text-inactive-color);
    }
  }

  .dynamic-relationship {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    .delete-icon {
      margin-left: 10px;
      cursor: pointer;
      background-color: var(--bg-color) !important;
      &:hover svg {
        fill: #dd2222 !important;
      }
      &:not(:hover) {
        opacity: 0.5;
      }
    }
  }

  .dynamic-property {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    .delete-icon {
      margin-left: 10px;
      cursor: pointer;
      background-color: var(--bg-color) !important;
      &:hover svg {
        fill: #dd2222 !important;
      }
      &:not(:hover) {
        opacity: 0.5;
      }
    }
  }

  .component-state-entry {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    .delete-icon {
      margin-left: 10px;
      cursor: pointer;
      background-color: var(--bg-color) !important;
      &:hover svg {
        fill: var(--highlight-red) !important;
      }
      &:not(:hover) {
        opacity: 0.5;
      }
    }
  }

  // .run-item, .trigger-item {
  //   padding: 13px 20px;
  //   background-color: white;
  //   border-radius: 3px;
  //   filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.244));
  //   // border: 1px solid rgb(229, 229, 229);
  //   cursor: pointer;
  //   margin-top: 20px;
  //   &:hover {
  //     filter: drop-shadow(1px 1px 4px rgba(0, 0, 0, 0.244));
  //   }
  // }

  .run-item, .trigger-item {
    padding: 13px 20px;
    background-color: var(--bg-color);
    border-radius: 3px;
    border: 1px solid rgb(229, 229, 229);
    border-left: 4px solid rgb(229, 229, 229);
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    &:hover {
      border-color: rgb(116, 116, 255);
    }

    .delete-icon {
      margin-left: 10px;
      cursor: pointer;
      background-color: var(--bg-color) !important;
      &:hover svg {
        fill: #dd2222 !important;
      }
      &:not(:hover) {
        opacity: 0.5;
      }
    }
  }

  .run-header {
    .delete-icon {
      margin-left: 10px;
      cursor: pointer;
      &:hover svg {
        fill: #dd2222 !important;
      }
      &:not(:hover) {
        opacity: 0.5;
      }
    }
  }

  .run-error {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 10px;
    overflow-wrap: break-word;
    color: rgb(226, 29, 29);
    border-radius: 3px;
    border: 1px solid rgb(226, 29, 29);
    border-left: 4px solid rgb(226, 29, 29);
    background-color: rgb(255, 224, 224);
  }

  .run-navigation-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 50px;
    .arrow-right-icon {
      fill: var(--text-inactive-color);
      margin: 0px 10px;
    }
    .navigation-item {
      cursor: pointer;
      padding: 5px 15px;
      border-radius: 3px;
      &:hover {
        background-color: var(--hover-bg-color);
        color: var(--text-active-color);
      }
      color: var(--text-inactive-color);
    }
  }

  .delete-run {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    & > div {
      cursor: pointer;
      padding: 10px 30px;
      color: rgb(197, 0, 0);
      background-color: rgb(255, 232, 232);
      border-radius: 3px;
      &:hover {
        background-color: rgb(197, 0, 0);
        color: white;
      }
    }
  }

  .execute-run-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    .execute-run {
      padding: 10px 30px;
      color: var(--highlight-green);
      background-color: var(--bg-color);
      border: 1px solid var(--highlight-green);
      border-radius: 3px;
      display: flex;
      justify-content: center;
      align-items: center;
      &:hover:not(.pending) {
        background-color: var(--light-green);
        cursor: pointer;
      }

      &.pending {
        .label {
          opacity: 0;
          pointer-events: none;
        }
        .loader {
          position: absolute;
          border: 5px solid var(--light-green);
          border-top: 5px solid var(--highlight-green);
          border-radius: 50%;
          width: 25px;
          height: 25px;
          animation: spin 2s linear infinite;
        }
      }
    }
    
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
  }

  .new-run {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    & > div {
      border-radius: 5px;
      border: 1px solid var(--highlight-green);
      cursor: pointer;
      padding: 10px 30px;
      color: var(--highlight-green);
      border-radius: 3px;
      &:hover {
        background-color: var(--light-green);
      }
    }
  }

  .add-ff-attribute, .add-state-entry, .add-input-entry, .add-trigger-entry {
    border-radius: 50%;
    cursor: pointer;
    svg {
      fill: #b5b5b5;
    }
    &:hover {
      background-color: var(--light-green);
      svg {
        fill: var(--highlight-green);
      }
    }
  }

  .run-tag {
    display: inline-block;
    font-size: 14px;
    border-radius: 10px;
    padding: 0px 5px;
    &.success {
      background-color: var(--light-green);
      color: var(--highlight-green);
    }
    &.failed {
      background-color: var(--light-red);
      color: var(--highlight-red);
    }
    &.skipped {
      background-color: #eeeeee;
      color: rgb(64, 64, 64);
    }
  }

  .component-run-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 3px;
    border: 1px solid rgb(231, 231, 231);
    margin-top: 40px;
    &.ignored {
      border-left: 4px solid rgb(231, 231, 231);
      .label {
        background-color: rgb(243, 243, 243);
      }
    }
    &:not(.ignored) {
      border-left: 4px solid rgb(174, 174, 255);
      .label {
        background-color: rgb(206, 206, 255);
        color: rgb(41, 41, 219);
      }
    }
    & > .run-input-header {
      display: flex;
      flex-direction: row;
      padding: 10px 20px;
      border-bottom: 1px solid rgb(231, 231, 231);
      // border-left: 2px solid rgb(84, 84, 255);
      box-sizing: border-box;
      // background-color: rgb(246, 246, 246);
      .delete-icon {
        margin-left: 10px;
        cursor: pointer;
        background-color: transparent !important;
        &:hover svg {
          fill: #dd2222 !important;
        }
        &:not(:hover) {
          opacity: 0.5;
        }
      }
      .label {
        display: inline-block;
        font-size: 14px;
        border-radius: 10px;
        padding: 0px 5px;
        &:not(:first-child) {
          margin-left: 10px;
        }
      }
    }
    & > .run-input-body {
      padding: 10px 20px;

      .ff-attribute-entry {
        display: flex;
        flex-direction: row;
        align-items: center;
        .delete-icon {
          margin-left: 10px;
          cursor: pointer;
          background-color: var(--bg-color) !important;
          &:hover svg {
            fill: #dd2222 !important;
          }
          &:not(:hover) {
            opacity: 0.5;
          }
        }
      }
    }
  }

  .processor-state {
    .delete-icon {
      cursor: pointer;
      background-color: var(--bg-color) !important;
      &:hover svg{
        fill: rgb(214, 37, 37);
      }
    }
  }
  .copy-state, .paste-state, .duplicate-run, .edit-run {
    margin-left: 10px;
    cursor: pointer;
    svg {
      fill: var(--text-inactive-color);
    }
    &:hover {
      svg {
        fill: var(--text-active-color);
      }
    }
  }

  .processor-state.version-0 {
    .component-state-entry {
      margin-top: 10px;
      border-radius: 3px;
      padding-left: 5px;
      padding-right: 5px;
      font-size: 90%;
      .key {
        padding-top: 5px;
        color: rgb(49, 52, 229);
      }
      .value {
        padding-top: 5px;
      }
    }
  }

  .processor-state.version-1 {
    .component-state-entry {
      margin-top: 10px;
      border: 1px solid rgb(216, 216, 216);
      border-radius: 3px;
      .key {
        padding-left: 10px;
        border-bottom: 1px solid rgb(216, 216, 216);
        background-color: rgb(243, 243, 243);
        color: rgb(28, 28, 28);
      }
      .value {
        padding: 5px;
        padding-left: 10px;
      }
    }
  }

  .processor-state.version-2 {
    .component-state-entry {
      margin-top: 15px;
      border-radius: 3px;
      padding-left: 10px;
      padding-right: 10px;
      // font-size: 90%;
      .key {
        padding: 0px 7px;
        display: inline-block;
        border-radius: 20px;
        border: 1px solid rgb(215, 215, 215);
        // background-color: rgb(246, 246, 246);
        // padding-top: 5px;
        color: rgb(75, 75, 75);

      }
      .value {
        padding: 0px 7px;
        // padding-top: 5px;
      }
    }
    margin-bottom: 40px;
  }

  .processor-state.version-3 {
    .component-state-entry {
      margin-top: 20px;
      border-radius: 3px;
      padding-left: 10px;
      padding-right: 10px;
      // font-size: 90%;
      .key {
        padding: 0px 7px;
        display: inline-block;
        border-radius: 20px;
        // border: 1px solid rgb(156, 162, 255);
        background-color: rgba(160, 184, 255, 0.216);
        // padding-top: 5px;
        color: rgb(45, 45, 45);

      }
      .value {
        padding: 0px 7px;
        // padding-top: 5px;
      }
    }
    margin-bottom: 40px;
  }

  .processor-state.version-4 {
    .component-state-entry {
      margin-top: 20px;
      border-radius: 3px;
      padding-left: 20px;
      padding-right: 20px;
      display: flex;
      flex-direction: row;
      // font-size: 90%;
      .key {
        width: 50%;
        color: rgb(122, 122, 122);

      }
      .value {
        width: 50%;
        // padding-top: 5px;
      }
    }
    margin-bottom: 20px;
  }

  .state-loader-container {
    width: 100%;
    display: flex;
    justify-content: center;
    .state-loader {
      margin-top: 10px;
      border: 5px solid #f4f4f4;
      border-top: 5px solid #b6b6b6;
      border-radius: 50%;
      width: 60px;
      height: 60px;
      animation: spin 2s linear infinite;
    }
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  .processor-status {
    margin-top: 20px;
    font-family: monospace;
    color: var(--text-color);

    .status-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      padding: 10px 15px;
      border: 1px solid var(--border-color);
      border-left: 4px solid var(--border-color);
      border-radius: 3px;

      &:hover {
        border-left-color: var(--highlight-blue);
      }

      .status-label {
        flex: 1;
      }

      .status-value {
        flex: 2;
        text-align: right;
      }
    }
  }
}

.bulletin-view {
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid;
  .timestamp {
    color: var(--highlight-blue);
    font-size: 0.8em;
    margin-top: 10px;
  }
  .message {
    font-size: 0.9em;
    white-space: pre;
    overflow: auto;
  }
  &:before {
    content: '';
    width: 4px;
    height: 100%;
    position: absolute;;
    left: 0;
    top: 0;
  }
  &.TRACE {
    &:before {
      background-color: var(--text-inactive-color);
    }
    border-color: var(--text-inactive-color);
  }
  &.DEBUG {
    &:before {
      background-color: var(--highlight-blue);
    }
    border-color: var(--highlight-blue);
  }
  &.INFO {
    &:before {
      background-color: var(--highligh-blue);
    }
    border-color: var(--highlight-blue);
  }
  &.WARN {
    &:before {
      background-color: var(--highlight-orange);
    }
    border-color: var(--highlight-orange);
  }
  &.ERROR {
    &:before {
      background-color: var(--highlight-red);
    }
    border-color: var(--highlight-red);
  }
  &.CRITICAL {
    &:before {
      background-color: var(--highlight-red);
    }
    border-color: var(--highlight-red);
  }
}

.processor-logs-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  .processor-logs {
    padding: 0 20px;
    overflow: auto;
    max-height: 100%;
  }
}

.jump-to-top {
  position: absolute;
  bottom: 25px;
  right: 25px;
  border-radius: 50%;
  background-color: var(--bg-color);
  padding: 10px;
  cursor: pointer;
  svg {
    fill: var(--text-inactive-color);
  }
  &:hover {
    svg {
      fill: var(--highlight-blue);
    }
    background-color: var(--light-blue);
  }

  .lock-icon {
    position: absolute;
    right: -5px;
    bottom: 0;
    fill: var(--highlight-blue);
  }

  .count-badge {
    position: absolute;
    right: -5px;
    bottom: 0;
    border-radius: 10px;
    font-size: 0.5em;
    padding: 0px 4px;
    background-color: var(--highlight-blue);
    color: white;
  }
}
