
.custom-color-select {
    position: relative;
    width: 100%;
    font-size: 16px;
    user-select: none;
}

.cs-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ced4da;
    padding: 6px 10px;
    cursor: pointer;
    background: #fff;
    color: #212529;
    min-height: 38px; /* stessa altezza di .form-select Bootstrap */
}

.cs-trigger:hover,
.cs-trigger:focus {
    border-color: #86b7fe;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

.cs-label { flex: 1; }

.cs-arrow {
    font-size: 10px;
    color: #6c757d;
    transition: transform .2s;
}

.custom-color-select.open .cs-arrow { transform: rotate(180deg); }

.cs-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 1050;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
}

.custom-color-select.open .cs-dropdown { display: block; }

.cs-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: #212529;
    font-size: 17px;
}

.cs-opt:hover { background: #f0f0f0; }
.cs-opt.active { background: #0d6efd; color: #fff; }
.cs-opt.active .cs-opt-dot { border-color: rgba(255,255,255,.5); }

/* Cerchio nel trigger */
.cs-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid #ced4da;
    display: none; /* nascosto finché non si sceglie un colore */
}

/* Cerchio nelle opzioni */
.cs-opt-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.15);
    background: #ccc;
}