.div_na_pola {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: center;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 30px;
}
.div_polovina textarea {
  min-width: 500px;
  height: 142px;
}
@media (max-width: 767px) {
  .div_polovina {
    min-width: 100%;
  }
}
textarea {
  width: 100%;
}

.ne_smanjuj {
  min-width: 600px;
}
.div_polovina:last-child {
  flex: 1;
  max-width: unset;
}
.div_polovina:last-child code {
  max-width: unset;
}
details {
  margin-top: 20px;
}
div.info {
  margin-bottom: 20px;
}
div.div_polovina b {
  display: inline-block;
  width: 100%;
  margin: 10px 0;
}
main > button {
  margin-top: 10px;
}


#konverter_kontrole {
  display: none;
}


.cp-image-wrapper {
  position: relative;
  width: 100%;
  height: stretch;
  max-height: 80vh;
  border-radius: 4px;
  overflow: hidden;
  cursor: crosshair;
  border: 1px solid rgb(var(--button_background_color));
}
#cp_source_img {
  display: none; /* Sakrivamo original, renderujemo na canvas */
}
#cp_canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Lupa */
.cp-magnifier {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none; /* Da ne smeta kretanju miša */
  overflow: hidden;
  z-index: 10;
  display: block;
}
.cp-magnifier.hidden {
  display: none;
}
#cp_mag_canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated; /* Obezbeđuje oštar pikselizovani grid */
}
.cp-mag-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border: 1.5px solid #000000;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #ffffff;
}

/* Paleta */
.cp-palette-section {
  margin-top: 20px;
}
.cp-palette-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cp-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.cp-palette-colors {
  display: flex;
  flex-grow: 1;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.cp-palette-color-block {
  flex: 1;
  height: 100%;
  cursor: pointer;
}

/* Rezultati boja */
.cp-color-preview-section {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  margin-bottom: 20px;
}
.cp-color-block {
  width: 110px;
  height: 70px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.cp-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}
.cp-copy-btn:hover {
  background-color: rgb(var(--button_background_color));
}
.cp-details-link {
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 25px;
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
}

/* Upload boks */
.cp-upload-box {
  background-color: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
}
.cp-upload-box h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #2d3748;
}
.cp-dropzone {
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  background-color: #ffffff;
  margin-bottom: 15px;
}
.cp-dropzone:hover {
  border-color: #4a5568;
}
.cp-drop-icon {
  font-size: 32px;
  color: #a0aec0;
}
.cp-upload-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.cp-btn-primary {
  flex: 1;
  background-color: #0f172a;
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
}

.cp-btn-primary:hover { background-color: #1e293b; }

.cp-protection-note {
  font-size: 12px;
  color: #718096;
  line-height: 1.4;
}
.highlight-magenta {
  color: #d53f8c;
  font-weight: 600;
}
.hidden {
  display: none !important;
}
