:host ::ng-deep .monaco-editor {
  --vscode-focusBorder: transparent !important;
}

:host {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  .editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    border-bottom: 1px solid #2b2b2b;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;

    .left-section {
      display: flex;
      align-items: center;
      justify-content: center;

      .editor-title {
        color: #e0e0e0;
        font-weight: 500;
        margin-right: 1rem;
        display: flex;
        align-items: center;

        .json-icon {
          font-size: 1.2rem;
          margin-right: 0.5rem;
          color: #e6bf3f; // Purple color for JSON icon
        }
      }

      .validation-message {
        margin-top: 2px;
        display: block;
        color: #ff5555;
        font-size: 0.9rem;
        font-weight: 300;
        margin-left: 0.2rem;
        line-height: 1;
      }
    }

    .copy-btn {
      background: transparent;
      border: none;
      cursor: pointer;
      color: #e0e0e0;
      padding: 4px;
      transition: color 0.2s;

      &:hover {
        color: #969696;
      }
    }
  }

  .editor-container {
    position: relative;
    background-color: #1b1b1b;
    height: 100%;
    width: 100%;

    .editor-loading-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(27, 27, 27, 0.9);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 10;
      transition: opacity 0.3s;

      span {
        margin-top: 8px;
        color: #e0e0e0;
        font-size: 1rem;
      }
    }
  }

  /* Static resize handle below the editor container */
  .editor-resize-handle {
    width: 100%;
    height: 16px;
    background: #2b2b2b; // add a background for visibility
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;

    .little-handle {
      width: 10px;
      height: 2px;
      background-color: #e0e0e0;
    }

    &:hover {
      background-color: #202020;

      .little-handle {
        border-color: #bb86fc;
      }
    }
  }
}

/* Spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 4px solid rgba(224, 224, 224, 0.3);
  border-top: 4px solid #e0e0e0;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}
