#canvas_id {
  max-width: 100%;
  height: auto;
  background: #fff;
  cursor: crosshair;
}

#canvas_id[aria-busy="true"] {
  cursor: wait;
  pointer-events: none;
}

.bk-color-panel {
  margin-bottom: 10px;
  padding: 15px;
  border: solid 10px #eee;
}

.bk-representative-colors {
  margin-top: 5px;
  padding: 10px 12px 12px;
  background: #f7f7f7;
  border: 1px solid #ddd;
}

.bk-representative-colors[hidden] {
  display: none;
}

.bk-representative-colors-label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 700;
}

.bk-representative-colors-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.bk-representative-color {
  min-width: 0;
  min-height: 54px;
  padding: 5px;
  overflow: hidden;
  color: #333;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 5px;
}

.bk-representative-color:hover,
.bk-representative-color:focus {
  border-color: #6ba522;
  box-shadow: 0 0 0 2px rgba(107, 165, 34, 0.2);
}

.bk-representative-color-swatch {
  display: block;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 3px;
}

.bk-current-color {
  display: flex;
  gap: 15px;
  align-items: stretch;
}

.bk-current-color-swatch {
  flex: 0 0 72px;
  min-height: 72px;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.bk-current-color-values {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.bk-current-color-values .input-group {
  width: 100%;
}

.bk-current-color-values .input-group-addon {
  width: 64px;
}

.bk-color-copy {
  min-width: 92px;
}

.bk-color-copy.is-copied {
  color: #fff;
  border-color: #5b981c;
  background: #6baa24;
}

.bk-color-copy:disabled {
  opacity: 0.55;
}

.bk-color-history-list {
  display: grid;
  gap: 12px;
}

.bk-color-favorites-list {
  display: grid;
  gap: 10px;
}

.bk-color-history-empty {
  margin: 0;
  padding: 18px;
  color: #666;
  text-align: center;
}

.bk-color-favorite {
  min-width: 44px;
  min-height: 44px;
  color: #777;
}

.bk-color-favorite.is-favorite {
  color: #9a6900;
  background: #fff3bf;
  border-color: #e0b84f;
}

.bk-color-favorite-item {
  overflow: hidden;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.bk-color-favorite-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 10px;
}

.bk-color-favorite-header .bk-color-history-hex {
  flex: 1;
}

.bk-color-favorite-header .bk-color-copy,
.bk-color-favorite-remove {
  min-width: 44px;
  width: 44px;
  min-height: 44px;
  padding-right: 8px;
  padding-left: 8px;
}

.bk-color-favorite-remove {
  color: #a94442;
}

.bk-color-favorite-remove:hover,
.bk-color-favorite-remove:focus {
  color: #fff;
  background: #c94b40;
  border-color: #b63e34;
}

.bk-color-history-item {
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

.bk-color-history-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 7px 10px;
}

.bk-color-history-swatch {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.bk-color-history-number {
  color: #666;
}

.bk-color-history-hex {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 700;
}

.bk-color-history-header .bk-color-copy {
  min-width: 44px;
  min-height: 44px;
}

.bk-color-history-detail-button {
  min-height: 44px;
  padding: 6px 12px;
  color: #555;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #f7f7f7;
}

.bk-color-history-detail-button[aria-expanded="true"] {
  color: #fff;
  border-color: #6ba522;
  background: #76b82a;
}

.bk-color-history-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #ddd;
  background: #f7f7f7;
}

.bk-color-history-details[hidden] {
  display: none;
}

.bk-color-history-details .input-group {
  width: 100%;
}

.bk-color-history-details .input-group-addon {
  width: 58px;
}

.bk-color-history-details input {
  background: #fff;
}

.bk-color-conversion-note {
  margin: 12px 0 0;
  color: #666;
  font-size: 13px;
}

.bk-color-copy-status {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1100;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 18px;
  color: #6d5200;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
  background: #fff3bf;
  border: 1px solid #e0b84f;
  border-left: 5px solid #d8a400;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
  animation: bk-color-copy-notice-in 0.18s ease-out;
}

.bk-color-copy-status:empty {
  display: none;
}

.bk-color-copy-status.is-error {
  color: #8a2d25;
  background: #f9dedb;
  border-color: #d99a94;
  border-left-color: #c94b40;
}

@keyframes bk-color-copy-notice-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.bk-color-eyedropper {
  position: fixed;
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 170px;
  padding: 8px 11px;
  color: #333;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 7px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.24);
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
  transform: translate(16px, 16px);
  white-space: nowrap;
}

.bk-color-eyedropper[hidden] {
  display: none;
}

.bk-color-eyedropper.is-touch {
  transform: translate(-50%, calc(-100% - 18px));
}

.bk-color-eyedropper.is-touch-below {
  transform: translate(-50%, 18px);
}

.bk-color-eyedropper-swatch {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.bk-color-eyedropper-values {
  display: flex;
  flex-direction: column;
}

.bk-color-eyedropper-rgb {
  color: #555;
  font-size: 12px;
}

.bk-color-eyedropper-hex {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

@media (max-width: 600px) {
  .bk-color-copy-status {
    max-width: calc(100vw - 24px);
  }

  .bk-current-color {
    flex-direction: column;
    gap: 8px;
  }

  .bk-representative-colors {
    padding-right: 7px;
    padding-left: 7px;
  }

  .bk-representative-colors-list {
    gap: 5px;
  }

  .bk-representative-color {
    min-height: 50px;
    padding: 4px 2px;
  }

  .bk-representative-color-swatch {
    height: 40px;
  }

  .bk-current-color-swatch {
    flex: 0 0 48px;
    width: 100%;
    min-height: 48px;
    align-self: stretch;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: none;
  }

  .bk-current-color-values,
  .bk-color-history-details {
    grid-template-columns: 1fr;
  }

  .bk-current-color-values .input-group-addon {
    width: 58px;
    height: 40px;
    padding: 6px 8px;
    font-size: 15px;
  }

  .bk-current-color-values .form-control {
    height: 40px;
    min-width: 0;
    padding: 6px 10px;
    font-size: 15px;
  }

  .bk-current-color-values .bk-color-copy {
    min-width: 48px;
    height: 40px;
    min-height: 40px;
    padding: 6px 10px;
    font-size: 0;
  }

  .bk-current-color-values .bk-color-copy .fa-copy,
  .bk-current-color-values .bk-color-copy .fa-check {
    font-size: 16px;
  }

  .bk-color-history-header {
    gap: 5px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .bk-color-history-detail-button {
    padding-right: 9px;
    padding-left: 9px;
  }

  .bk-color-favorite-header {
    gap: 7px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .bk-color-history-number {
    display: none;
  }
}
