.tools_section {
    padding: 28px 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

@media screen and (min-width: 768px) {
    .tools_section {
        padding: 64px;
    }
}

.tools_wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media screen and (min-width: 768px) {
    .tools_wrapper {
        gap: 24px;
    }
}

.image_color_picker_wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media screen and (min-width: 768px) {
    .image_color_picker_wrapper {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 24px;
    }
}

.image_card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

@media screen and (min-width: 768px) {
    .image_card {
        padding: 24px;
        gap: 24px;
    }
}

.image_box {
    display: flex;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

canvas {
    max-width: 100%;
    cursor: crosshair;
}

#zoomCanvas {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    pointer-events: none;
    display: none;
    background: #000;
}

#zoomCanvas::after {
    content: "";
    position: absolute;
    inset: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    border: 2px solid red;
}

.palette_wrapper {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

@media screen and (min-width: 768px) {
    .palette_wrapper {
        gap: 24px;
    }
}

.palette_count_wrapper {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

@media screen and (min-width: 768px) {
    .palette_count_wrapper {
        gap: 12px;
    }
}

.palette_count{
    display: none;
}

.circleBtn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #e5e7eb; 
  background: #ffffff;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.circleBtn svg{
    width: 22px;
    height: 22px;
}
.circleBtn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}

@media screen and (min-width: 768px) {
    .circleBtn {
        width: 36px;
        height: 36px;
    }
}

.palette {
    display: flex;
    flex: 1;
}

.color_box {
    display: block!important;
    width: 100%;
    height: 24px;
    cursor: pointer;
}
@media screen and (min-width: 768px) {
    .color_box {
        height: 36px;
    }
}

.color_card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    max-height: max-content;
}

@media screen and (min-width: 768px) {
    .color_card {
        padding: 24px;
        gap: 24px;
    }
}

.preview_wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media screen and (min-width: 768px) {
    .preview_wrapper {
    }
}

.color_preview {
    display: block!important;
    height: 50px;
    background-color: #000;
    border-radius: 10px;
}

.field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--light-bgcolor);;
    border-radius: 8px;
    margin-bottom: 8px;
}

.field span {
    min-width: 60px;
    font-weight: 600;
    padding: 10px 12px;
    border-right: 1px solid var(--btn-secondary-bgcolor);
}
.field code {
    font-weight: 600;
    flex: 1;
    font-size: 16px;
    padding: 0 10px;
}

.field button {
    border: none;
    margin: 10px;
    background: var(--btn-bgcolor);
    color: var(--btn-color);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.upload label {
    display: inline-block;
    background: var(--btn-bgcolor);
    color: var(--btn-color);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.upload input {
    display: none;
}

.color_converter_wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    max-height: max-content;
}

@media screen and (min-width: 768px) {
    .color_converter_wrapper {
        padding: 24px;
        gap: 24px;
    }
}
.color_input_wrapper {
    width: 248px;
    height: 48px;
    position: relative;
    overflow: hidden;
    background: #206080;
    margin: 0 auto;
    border-radius: 12px;
}
.color_input{
    position: absolute;
    inset: 0;
    opacity: 0;
    width:100%;
    height: 100%;
    cursor: pointer;
}


.color_converter {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.color_converter .field span {
    min-width: 74px;
}

@media screen and (min-width: 768px) {
    .color_converter {
        grid-template-columns: 1fr 1fr;
        gap: 12px 24px;
    }
}

.color_converter input{
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    font-size: 18px;
    padding-left: 12px;
}

.color_converter input:focus-visible{
    outline:none;
}