.quizpress-color-control {
  position: relative;
  display: inline-block;
  &__button {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  &__preview {
    font-size: 14px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 2px;
    min-width: 16px;
    text-align: center;
  }

  &__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid var(--quizpress-border-color);
    border-radius: 4px;
    padding: 8px;
    z-index: 1000;
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  &__title {
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 12px;
  }

  &__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin: 12px 0;
  }

  &__swatch {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.1s ease;

    &:hover {
      transform: scale(1.1);
      border-color: var(--quizpress-border-color);
    }
  }

  &__custom {
    border-top: 1px solid var(--quizpress-border-color);
    padding-top: 8px;
  }

  &__label {
    font-size: 11px;
    color: #666;
    display: block;
    margin-bottom: 4px;
  }

  &__input {
    width: 100%;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 12px;

    &:focus {
      outline: none;
      border-color: var(--quizpress-primary);
    }
  }
}