/* Section order: the dialog, and its buttons in the builder sidebar and the phone sections menu */

/* sidebar button, under the steps: set apart by a hairline and a soft green frame */
.so-side {
    position: relative; display: flex; align-items: center; gap: 11px; width: calc(100% - 20px); margin: 24px 10px 0;
    padding: 9px 10px; border: 1px solid #A6DCC1; border-radius: 10px; background: #F6FEF9;
    color: #0F1C35; font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s;
}
.so-side::before { content: ""; position: absolute; left: 0; right: 0; top: -13px; height: 1px; background: #EAECF0; pointer-events: none; }
.so-side:hover { background: #ECFDF3; border-color: #12A26D; }
.so-side:focus-visible { outline: 2px solid #12A26D; outline-offset: 2px; }
.so-side-ico { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #ECFDF3; color: #067647; }
.so-side-text { display: flex; flex-direction: column; min-width: 0; }
.so-side-title { font-size: 13.5px; font-weight: 600; line-height: 18px; }
.so-side-sub { font-size: 12px; color: #6B7280; line-height: 16px; }
.so-side[hidden] { display: none; }
.so-mobile { margin: 22px 12px 12px; width: calc(100% - 24px); }
/* the desktop sidebar is dark navy: the same frame in a muted green */
.rd-sidebar .so-side { border-color: rgba(52, 211, 153, .32); background: rgba(16, 185, 129, .07); color: rgba(255, 255, 255, .88); }
.rd-sidebar .so-side::before { background: rgba(255, 255, 255, .08); }
.rd-sidebar .so-side:hover { background: rgba(16, 185, 129, .12); border-color: rgba(52, 211, 153, .55); }
.rd-sidebar .so-side-ico { background: rgba(52, 211, 153, .14); color: #6EE7B7; }
.rd-sidebar .so-side:hover .so-side-ico { background: rgba(52, 211, 153, .2); }
.rd-sidebar .so-side-title { font-weight: 500; font-size: 14px; }
.rd-sidebar .so-side-sub { color: rgba(255, 255, 255, .5); }

/* the dialog */
.so-overlay {
    position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(15, 28, 53, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .18s ease;
}
.so-overlay[hidden] { display: none; }
.so-overlay.so-open { opacity: 1; }
.so-panel {
    width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 16px;
    box-shadow: 0 28px 70px -18px rgba(15, 28, 53, .45); color: #111827;
    transform: translateY(8px) scale(.985); transition: transform .2s ease;
}
.so-open .so-panel { transform: none; }
.so-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; }
.so-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: #0F1C35; }
.so-head p { margin: 0; font-size: 13.5px; line-height: 19px; color: #6B7280; }
.so-x {
    flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #E5E7EB; border-radius: 999px;
    background: #fff; color: #6B7280; cursor: pointer;
}
.so-x:hover { background: #F4F5F7; color: #111827; }

.so-list { list-style: none; margin: 4px 20px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.so-item {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px 0 10px;
    border: 1px solid #E5E7EB; border-radius: 10px; background: #fff; cursor: grab; user-select: none;
    transition: box-shadow .15s, border-color .15s, background .3s;
}
.so-item:hover { border-color: #CBD3DE; box-shadow: 0 4px 12px -6px rgba(15, 28, 53, .25); }
.so-item.so-dragging { opacity: .55; cursor: grabbing; }
.so-item.so-moved { background: #F1F6FF; }
.so-grip { flex: none; color: #9CA3AF; display: flex; }
.so-num { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: #F1F4F8; color: #4B5563; font-size: 11.5px; font-weight: 600; }
.so-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-btns { flex: none; display: flex; gap: 4px; }
.so-move {
    width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px;
    background: none; color: #374151; cursor: pointer; transition: background .15s, color .15s;
}
.so-move:hover:not([disabled]) { background: #F1F4F8; color: #0F1C35; }
.so-move:focus-visible { outline: 2px solid #3B82F6; outline-offset: 1px; }
.so-move[disabled] { color: #D1D5DB; cursor: default; }
.so-empty { padding: 14px; border: 1px dashed #D5DBE4; border-radius: 10px; font-size: 13.5px; color: #6B7280; }
.so-note { margin: 12px 20px 0; font-size: 12.5px; line-height: 18px; color: #6B7280; }
.so-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 20px; }
.so-reset { height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: #4B5563; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.so-reset:hover { background: #F3F4F6; color: #111827; }
.so-done {
    height: 40px; padding: 0 20px; border: 0; border-radius: 10px; color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    background: linear-gradient(180deg, #22314F 0%, #0F1C35 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 14px -6px rgba(15, 28, 53, .45);
}
.so-done:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) { .so-overlay, .so-panel, .so-item { transition: none; } }
