/* Shared color picker (EditTemplate + SurveyBuilder CssColorPicker) */

.template_editor_color_picker {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 320px;
}

.template_editor_color_row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.template_editor_color_picker input[type="color"],
.template_editor_color_swatch {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.template_editor_color_picker input[type="color"]:hover,
.template_editor_color_swatch:hover {
    border-color: #781e49;
    box-shadow: 0 0 0 2px rgba(120, 30, 73, 0.2);
}

.template_editor_color_hex {
    flex: 1;
    height: 32px;
    font-size: 12px;
    font-family: Consolas, "Courier New", monospace;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    color: #333;
    text-transform: uppercase;
    min-width: 0;
    box-sizing: border-box;
    line-height: 30px;
}

.template_editor_color_hex:focus {
    border-color: #781e49;
    outline: none;
    background: #fff;
}

.template_editor_color_picker_opacity .form-label {
    font-size: 0.78rem;
    color: #5f6368;
    margin-bottom: 0.25rem;
}

.template_editor_opacity_row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.template_editor_opacity_slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, transparent, var(--slider-color, #781e49));
    border: 1px solid #cfd4d9;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

.template_editor_opacity_slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #781e49;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.template_editor_opacity_slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #781e49;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.template_editor_opacity_value {
    font-size: 11px;
    min-width: 36px;
    text-align: right;
    color: #666;
    font-weight: 600;
}
