/**
 * S-Cloud — Saved Views CSS (v2.2.47)
 */

/* ── Wrapper / dropdown selector ── */
.sc-views-wrap {
    position: relative;
    display: inline-block;
}
.sc-views-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    font-size: .85rem; font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.sc-views-toggle:hover { border-color: #7C3AED; }
.sc-views-current { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-views-wrap.is-open .sc-views-toggle { border-color: #7C3AED; background: #faf5ff; }

.sc-views-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0;
    width: 280px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 100;
    display: none;
    overflow: hidden;
}
.sc-views-wrap.is-open .sc-views-dropdown { display: block; }

.sc-views-dropdown-list {
    list-style: none; padding: 4px 0; margin: 0;
    max-height: 320px; overflow-y: auto;
}
.sc-views-section {
    padding: 6px 12px 4px;
    font-size: .65rem; text-transform: uppercase;
    color: #9ca3af; font-weight: 700; letter-spacing: .04em;
}
.sc-views-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: .85rem;
    transition: background .1s;
}
.sc-views-item:hover { background: rgba(124,58,237,.05); }
.sc-views-dot {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0;
}
.sc-views-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-views-badge {
    font-size: .65rem;
    background: rgba(124,58,237,.1);
    color: #7C3AED;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
}
.sc-views-del {
    background: none; border: none;
    color: #9ca3af;
    width: 20px; height: 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem; line-height: 1;
    opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.sc-views-item:hover .sc-views-del { opacity: 1; }
.sc-views-del:hover { background: #fee2e2; color: #ef4444; }

.sc-views-empty {
    padding: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: .85rem;
}
.sc-views-dropdown-foot {
    padding: 8px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
}

/* ── Modal Save View ── */
.sc-savemodal-overlay {
    position: fixed; inset: 0;
    background: rgba(20,14,30,.55);
    backdrop-filter: blur(3px);
    z-index: 1085;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.sc-savemodal {
    background: #fff;
    border-radius: 14px;
    max-width: 480px; width: 100%; max-height: 90vh; overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.sc-savemodal-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eef0f3;
    display: flex; justify-content: space-between; align-items: center;
}
.sc-savemodal-close {
    background: none; border: none;
    font-size: 1.4rem;
    width: 30px; height: 30px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
}
.sc-savemodal-close:hover { background: #f3f4f6; }
.sc-savemodal-body {
    padding: 1.25rem;
    overflow-y: auto;
}
.sc-savemodal-foot {
    padding: 1rem 1.25rem;
    border-top: 1px solid #eef0f3;
    display: flex; justify-content: flex-end; gap: 8px;
}
.sc-savemodal-colors {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.sc-savemodal-color {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
    cursor: pointer;
    transition: transform .15s;
}
.sc-savemodal-color:hover { transform: scale(1.1); }
.sc-savemodal-color.is-active {
    box-shadow: 0 0 0 2px #1f2937;
}
