/* Main Sections */
.duotone-section {
    border-bottom: 1px solid #ddd;
    padding-bottom: 1.5em;
    margin-bottom: 1.5em;
}

/* Preset Swatches */
.duotone-presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.duotone-preset-swatch {
    position: relative;
    cursor: pointer;
    border: 1px solid #ccc;
    width: 40px;
    height: 40px;
    overflow: visible;
    z-index: 1;
    display: inline-block;
    vertical-align: top;
    border-radius: 4px;
}

.duotone-preset-swatch:hover .duotone-delete-x {
    display: flex;
}

/* Delete 'X' button for presets and clear 'X' for image */
.duotone-delete-x,
.duotone-clear-image-x {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #333;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 10;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.duotone-delete-x {
    padding: 0;
    margin: 0;
}


/* Image Drop Zone */
#duotone-drop-zone {
    border: 2px dashed #999;
    padding: 30px;
    text-align: center;
    color: #666;
    cursor: pointer;
    margin-bottom: 10px;
    max-width: 600px;
    position: relative;
    transition: background-color .2s, border-color .2s;
    border-radius: 4px;
}

#duotone-drop-zone.has-image:hover .duotone-clear-image-x {
    display: flex;
}

#duotone-drop-zone.has-image {
    padding: 0;
    border-style: solid;
    border-color: #ccc;
}

#duotone-drop-zone.has-image #duotone-image-preview p {
    display: none;
}

#duotone-drop-zone #duotone-image-preview img {
    display: block;
    max-width: 100%;
    height: auto;
    /* This transition makes the CSS filter changes feel smoother */
    transition: filter .1s ease-in-out;
    border-radius: 4px;
}

#duotone-drop-zone.dragging {
    border-color: #007cba;
    background-color: #f0f8ff;
    color: #000;
}

/* Adjustment Sliders */
#duotone-adjustments {
    margin-top: 20px;
}
#duotone-adjustments table {
    width: 100%;
    max-width: 600px;
}
#duotone-adjustments table td {
    width: 70%;
}
.slider-container input[type=range] {
    vertical-align: middle;
    width: calc(100% - 60px);
}
.slider-container .slider-value {
    display: inline-block;
    width: 50px;
    text-align: right;
    font-weight: bold;
    color: #555;
}

/* Save Button & Notices */
#duotone-save-button {
    margin-top: 20px;
}
#duotone-ajax-notice {
    max-width: 600px;
    margin-top: 15px;
    padding: 10px 12px;
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    display: none;
}
