*,
::before,
::after {
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  font-family: "Inter", sans-serif;
  border-radius: 50%;
}

.main-container {
  padding: 3px;
  border-radius: 5px;
  width: 400px;
  background-color: #faf9f9;
  box-shadow: 0px 4px 11px 0px rgba(0, 0, 0, 0.15);
}

.topbar {
  background-color: #faf9f9;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
}

.custom-color-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-btn {
  width: 35px;
  height: 35px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background-color: #ff0000;
  cursor: pointer;
}

.color-column:hover .hex-value {
  border: 5px solid #2b2a2a;
  background-color: #2b2a2a;
  color: #ebe9e9;
  font-weight: bold;
}

/* COLOR PICKER */
input[type="color"],
::picker(input[type="color"]) {
  appearance: base-select;
}

input[type="color"] {
  border: 1px solid #d1d5db;
  height: 42px;
  width: 60px;
  cursor: pointer;
  background: none;
  padding: 2px;
  border-radius: 4px;
}

::picker(input[type="color"]) {
  border-radius: 12px;
  border: 1px solid #d1d5db;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* SELECT BOX */
select,
::picker(select) {
  appearance: base-select;
}

select {
  display: flex;
  align-items: center;
  font-size: 14px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 12px;
  flex-grow: 1;
  height: 42px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/*  ANIMATION FOR ARROW */
select::picker-icon {
  transition: transform 0.2s ease;
}

select:open::picker-icon {
  transform: rotate(180deg);
}
::picker(select) {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

select:focus-visible {
  outline: 2px solid #3b82f6;
  border-color: #3b82f6;
}

option {
  padding: 8px 12px;
  border-radius: 5px;
}

option:hover {
  background-color: #938f8f;
  color: white;
  transition: all 0.2s ease;
}
option:checked {
  background-color: #2b2a2a;
  color: white;
}

/* BTN STYLING */
button {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0 15px;
  height: 42px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #2b2a2a;
  color: #ffffff;
}

button:active {
  background-color: #ffffff;
  color: #2b2a2a;
  transition: none; /* Instant flash on press */
}

button:focus,
select:focus {
  outline: 2px solid #d6d3d3;
}

button:focus-visible,
select:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* COLORS DISPLAY */
.colors {
  display: flex;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.color-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rectangle {
  flex-grow: 1;
  cursor: pointer;
}

.default-rectangle {
  background-color: #ff0000;
}

.color-column:hover .rectangle {
  border-style: solid;
  border-color: #faf9f9;
  border-width: 5px 2px 1px 2px;
}

.hex-value {
  background-color: #faf9f9;
  text-align: center;
  font-size: 0.8em;
  padding: 15px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.hex-value:active,
.color-column.active-flash .hex-value {
  background-color: #ffffff !important;
  color: #2b2a2a !important;
  transition: none !important;
  font-weight: bold;
  border-color: #ffffff !important;
}

/* Message POP UP */
#notificationCopyModal {
  display: none;
}

p {
  margin-left: 1em;
  font-weight: bolder;
}

/* COLOR PICKER MODAL */
.color-picker-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.color-picker-content {
  background: white;
  border-radius: 8px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-title {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
}

/* HUE BAR */
.hue-container {
  margin-bottom: 10px;
  position: relative;
}

.hue-bar {
  width: 100%;
  height: 30px;
  background: linear-gradient(
    to right,
    hsl(0, 100%, 50%),
    hsl(60, 100%, 50%),
    hsl(120, 100%, 50%),
    hsl(180, 100%, 50%),
    hsl(240, 100%, 50%),
    hsl(300, 100%, 50%),
    hsl(360, 100%, 50%)
  );
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
}

.hue-indicator {
  position: absolute;
  width: 3px;
  height: 32px;
  background: white;
  border: 2px solid #333;
  left: 0;
  top: -1px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* BRIGHTNESS SLIDER */
.brightness-container {
  margin-bottom: 10px;
  position: relative;
}

.brightness-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brightness-label {
  font-size: 12px;
  font-weight: 600;
}

.reset-btn {
  padding: 0 8px;
  font-size: 11px;
  background: #f0f0f0;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
  height: 30px;
}

.brightness-track-container {
  position: relative;
  margin-top: 5px;
}

.brightness-track {
  width: 100%;
  height: 20px;
  background: linear-gradient(to right, #000000, #ffffff);
  border: 1px solid #d1d5db;
  border-radius: 4px;
  position: relative;
}

.brightness-indicator {
  position: absolute;
  width: 3px;
  height: 24px;
  background: #333;
  border: 2px solid white;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 10;
}

.brightness-slider {
  position: absolute;
  width: 100%;
  height: 20px;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  z-index: 5;
}

/* EYEDROPPER BUTTON */
.eyedropper-btn {
  width: 100%;
  padding: 10px;
  background: #f0f0f0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 10px;
  font-weight: 600;
}

/* COLOR INPUTS */
.color-inputs-container {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.color-input {
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
}

.hex-input {
  width: 87px;
  font-family: monospace;
}

.rgb-input {
  width: 50px;
}

/* remove spinner arrows from number inputs */
.rgb-input::-webkit-outer-spin-button,
.rgb-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rgb-input[type="number"] {
  -moz-appearance: textfield;
}

/* HOVER STATES */
#resetBrightnessBtn:hover,
#pickerEyeDropper:hover {
  background-color: #2b2a2a !important;
  color: #ffffff !important;
}
