.colorPicker-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-sizing: border-box;
    height: 24px;
    margin: 0 4px;
    padding: 3px 5px 3px 3px;
    border: 1px solid #c3cad4;
    border-radius: 6px;
    background: #ffffff;
    color: #5b6573;
    cursor: pointer;
    vertical-align: middle;
    user-select: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.colorPicker-trigger:hover {
    border-color: #8d97a5;
}
.colorPicker-trigger:focus {
    outline: none;
}
.colorPicker-trigger:focus-visible,
.colorPicker-trigger.colorPicker-open {
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.22);
}

.colorPicker-triggerSwatch {
    display: block;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.colorPicker-chevron {
    display: flex;
}
.colorPicker-chevron svg {
    width: 9px;
    height: 6px;
    transition: transform 0.15s ease;
}
.colorPicker-open .colorPicker-chevron svg {
    transform: rotate(180deg);
}

.colorPicker-popover {
    position: fixed;
    z-index: 1000; /* above popup dialogs */
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d5dbe3;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
    font-family: var(--font-ui);
    font-size: 12px;
    color: #374151;
    animation: colorPicker-pop 0.12s ease-out;
}
@keyframes colorPicker-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.colorPicker-grid {
    display: grid;
    gap: 5px;
}

.colorPicker-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.colorPicker-swatch.colorPicker-light {
    color: #1f2937;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}
.colorPicker-swatch:hover {
    transform: scale(1.15);
}
.colorPicker-swatch:focus {
    outline: none;
}
.colorPicker-swatch:focus-visible,
.colorPicker-swatch.colorPicker-selected {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2b6cb0;
}
.colorPicker-swatch svg {
    width: 14px;
    height: 14px;
}

.colorPicker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e9ef;
}

.colorPicker-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px 2px 2px;
    border-radius: 5px;
    cursor: pointer;
}
.colorPicker-custom:hover {
    background: #f1f4f8;
}
.colorPicker-custom input {
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: none;
    cursor: pointer;
}
.colorPicker-custom input::-webkit-color-swatch-wrapper {
    padding: 0;
}
.colorPicker-custom input::-webkit-color-swatch {
    border: 0;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.colorPicker-custom input::-moz-color-swatch {
    border: 0;
    border-radius: 5px;
}
.colorPicker-customSelected input {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #2b6cb0;
}
.colorPicker-custom input:focus-visible {
    outline: 2px solid #2b6cb0;
    outline-offset: 2px;
}

.colorPicker-current {
    font-family: Consolas, 'Courier New', monospace;
    color: #6b7280;
    text-transform: uppercase;
}
