/* The link between a PC's Basecamp and the server's: the top bar's state, Settings (Server, Sync, Clients), the conflicts. */

/* The link's dot */
.sy-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ac578; box-shadow: 0 0 0 3px rgba(74, 197, 120, .18); flex: none; }


/* The top bar: the name and where this Basecamp stands, one width on a PC and on the server */
.logo-ctx { width: 236px; }
.logo-ctx .logo-name { min-width: 0; }
.hd-ctx { display: flex !important; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; overflow: hidden; }
.hd-ctx i { font-style: normal; }
.hd-ctx b { display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-weight: 500; cursor: pointer; transition: color .15s; }
.hd-ctx b:hover { color: var(--text); }
.hd-ctx b span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.logo-ctx .logo-mark { flex: none; }
.hd-ctx b .ico { width: 12px; height: 12px; flex: none; color: #4ac578; }
.hd-ctx b.is-off .ico { color: var(--muted); }
.hd-ctx b.is-warn .ico { color: var(--warn); }
.hd-ctx .sy-dot { width: 6px; height: 6px; box-shadow: 0 0 0 2px rgba(74, 197, 120, .18); }
.top .top-right { gap: 6px; }
.top .jump { height: 36px; }
.profile-chip { gap: 4px; height: 36px; padding: 0 6px 0 3px; }
.profile-chip .avatar { width: 28px; height: 28px; }
.side-ctx { display: grid; gap: 2px; min-width: 0; }
.side-ctx small { font: 500 11px var(--mono); color: var(--muted); }

/* Sync: making spaces on either side */
.sy-make { align-items: flex-start; white-space: normal; }
.sy-make > .ico { margin-top: 2px; color: var(--accent-text) !important; }
.sy-make > span { display: grid; gap: 2px; }
.sy-make small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.sy-dd .dd-menu { min-width: 300px; }
.sy-dd-search { margin: 0 0 6px; }
.sy-dd-search .ico { width: 16px; height: 16px; flex: none; }
.sy-dd-list { max-height: 260px; overflow-y: auto; display: grid; gap: 2px; }
.sy-dd-list .dd-item[hidden], .sy-dd-list .dd-none[hidden] { display: none; }
.sy-as-dd, .sy-as-dd .dd-btn { min-width: 260px; }
.sy-as-dd .dd-menu { min-width: 260px; }
.sy-bulk-name { display: grid; justify-items: start; gap: 4px; }
.sy-bulk-name small { color: var(--muted); font-size: 12px; }
.sub-head .help { margin-left: 6px; }

/* Home and Review: the conflict's warning colour */
.hm-need.is-warn .hm-need-ico { background: var(--warn-soft); color: var(--warn); }
.cu-row.is-conflict .cu-kind { background: var(--warn-soft); color: var(--warn); }
.cu-state.is-warn { color: var(--warn); }
.cu-state.is-refused { color: var(--danger); }
.cu-filters .sy-n { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 4px; padding: 0 4px; border-radius: 8px; background: var(--warn); color: #121212; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }

/* Settings, Server: the linked server and its numbers */
.sy-ico { background: var(--ok-soft); color: #4ac578; }
.sy-ico.is-open { background: var(--warn-soft); color: var(--warn); }
.sy-ico.is-refused { background: var(--danger-soft); color: var(--danger); }
.sy-health { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.sy-health .ico { width: 15px; height: 15px; }
.sy-health.is-warn { color: var(--warn); }
.sy-health.is-bad { color: var(--danger); }
.sy-key { display: flex; gap: 8px; padding: 4px 12px 10px; }
.sy-key input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: var(--r-in); border: 1px solid var(--line-2); background: var(--input); }
.sy-key input:focus { border-color: var(--accent); }
.sy-conflict-dlg.dlg-compact { width: min(760px, calc(100vw - 32px)); }
.sy-conflict-dlg .cu-dlg-body { gap: 12px; }
.cd-head i.sy-warn-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; }
.cd-head i.sy-warn-ico .ico { width: 15px; height: 15px; }
.sy-map.is-ph { min-height: 60px; }
.sy-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sy-facts > div { display: grid; gap: 2px; padding: 14px 18px; }
.sy-facts > div + div { border-left: 1px solid var(--line); }
.sy-facts span { color: var(--muted); font-size: 12px; font-weight: 600; }
.sy-facts b { font-size: 20px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.sy-facts b.is-warn { color: var(--warn); }
.sy-facts small { color: var(--muted); font-size: 12px; }
.sy-facts a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-weight: 600; transition: color .15s; }
.sy-facts a .ico { width: 13px; height: 13px; transition: transform .2s var(--ease); }
.sy-facts a:hover .ico[data-ico="arrow-right"], .sy-facts a:hover .ico[data-ico="chevron-right"] { transform: translateX(2px); }
.sy-form { display: grid; gap: 14px; padding: 18px; }
.sy-form .field input { max-width: 460px; }
.sy-form-foot { display: flex; }
.sy-spin { animation: sy-spin .8s linear infinite; }
@keyframes sy-spin { to { transform: rotate(360deg); } }

/* Settings, Sync: one row per local space */
.sy-head, .sy-map { display: grid; grid-template-columns: minmax(170px, 1fr) 24px minmax(240px, 1.4fr) 130px; align-items: center; gap: 12px; }
.sy-head { padding: 10px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.sy-map { min-height: 60px; padding: 10px 18px; transition: opacity .2s; }
.sy-local { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sy-map.is-kid .sy-local { padding-left: 14px; }
.sy-local > .ico { width: 15px; height: 15px; color: var(--muted); flex: none; }
.sy-arrow { display: grid; place-items: center; color: var(--muted); }
.sy-arrow .ico { width: 16px; height: 16px; }
.sy-map.is-local .sy-arrow { opacity: .35; }
.sy-target { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sy-follow { flex: 0 1 auto; min-width: 0; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-dd .dd-btn { min-width: 230px; height: 36px; }
.sy-dd .dd-btn > span { display: inline-flex; align-items: center; gap: 8px; }
.sy-dd .dd-btn > span .ico { color: var(--muted); }
.sy-dd .dd-menu { min-width: 250px; }
.sy-map.is-local .sy-dd .dd-btn > span { color: var(--muted); }
.sy-st { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.sy-st .ico { width: 14px; height: 14px; }
.sy-st.is-ok { color: #4ac578; }
.sy-st.is-up, .sy-st.is-down { color: var(--accent-text); }
.sy-st.is-warn { color: var(--warn); }
.sy-maps.is-off { opacity: .45; pointer-events: none; }
.sy-view { margin-bottom: 14px; }
.sy-view button .ico { width: 16px; height: 16px; }
.sy-off { margin-bottom: 12px; }

/* The conflict dialog: each overlap, the server's side and this PC's */
.sy-warn-ico { background: var(--warn-soft); color: var(--warn); }
.cu-chips > .ico { width: 15px; height: 15px; color: var(--muted); align-self: center; }
.sy-hunk { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-card); border: 1px solid var(--line-2); }
.sy-hunk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sy-hunk-head b { font-size: 13px; }
.sy-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sy-side { display: grid; align-content: start; gap: 6px; padding: 10px; border-radius: calc(var(--r-card) - 2px); border: 1px solid var(--line); transition: opacity .2s, border-color .2s, background-color .2s; }
.sy-side.is-kept { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.sy-side.is-dropped { opacity: .45; }
.sy-side.is-dropped .cu-diff .d-add { background: rgba(248, 113, 113, .08); text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .5); color: var(--muted); }
.sy-side.is-dropped .cu-diff i { color: var(--danger); }
.sy-side-head { display: flex; align-items: center; gap: 7px; min-height: 22px; font-size: 12.5px; }
.sy-side-head .ico { width: 15px; height: 15px; color: var(--muted); }
.sy-side-head .badge { margin-left: auto; }
.sy-side .cu-diff { margin-top: 0; }

/* What the curator settled, folded; what it was not sure about, with its reason */
.sy-hunk-wrap { display: grid; gap: 10px; }
.sy-unsure { padding: 12px 14px; }
.sy-unsure b { font-size: 13px; }
.sy-unsure p { font-size: 13px; line-height: 1.5; }
.sy-settled { border-radius: var(--r-card); border: 1px solid var(--line); }
.sy-settled-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; border-radius: var(--r-card); transition: background-color .15s; }
.sy-settled-row:hover { background: var(--hover); }
.sy-settled-row > .ico { width: 17px; height: 17px; color: #4ac578; flex: none; }
.sy-settled-row > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.sy-settled-row b { font-size: 13px; font-weight: 600; }
.sy-settled-row small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.sy-settled-act { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: 12.5px; font-weight: 600; flex: none; }
.sy-settled-act .ico { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.sy-settled.is-open .sy-settled-act .ico { transform: rotate(180deg); }
.sy-settled .grow-swap { margin-top: 0; }
.sy-settled .sy-hunk { border: 0; border-top: 1px solid var(--line); border-radius: 0; }

/* Server, Clients: the auto-accept chip, lit when on */
.sy-auto { flex: none; height: 30px; }
.sy-auto:disabled { opacity: .45; cursor: not-allowed; }
.sy-client.is-paused .person-main, .sy-client.is-paused .sy-auto { opacity: .5; }
.sy-client.is-paused .sy-ico { background: var(--hover); color: var(--muted); }
.switch:disabled { cursor: not-allowed; }

/* The danger rows arm before they act */
.do-row.is-armed { background: var(--danger); color: #fff; }
.do-row.is-armed .help { color: rgba(255, 255, 255, .8); }


@media (max-width: 900px) {
	.sy-head { display: none; }
	.sy-map { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "local st" "target target"; gap: 8px 12px; padding: 12px 16px; }
	.sy-local { grid-area: local; }
	.sy-arrow { display: none; }
	.sy-target { grid-area: target; padding-left: 0; }
	.sy-map.is-kid .sy-target { padding-left: 14px; }
	.sy-st { grid-area: st; }
	.sy-dd, .sy-dd .dd-btn { width: 100%; min-width: 0; }
}
@media (max-width: 640px) {
	.sy-facts { grid-template-columns: 1fr; }
	.sy-facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
	.sy-sides { grid-template-columns: 1fr; }
	.sy-hunk-head { flex-wrap: wrap; }
	.sy-server { flex-wrap: wrap; }
	.sy-server .sy-health { order: 3; flex-basis: 100%; padding-left: 50px; }
	.sy-client { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "ico main dots" ". auto auto"; gap: 8px 14px; }
	.sy-client > .sy-ico { grid-area: ico; }
	.sy-client > .person-main { grid-area: main; }
	.sy-client > .icon-btn { grid-area: dots; }
	.sy-client > .sy-auto { grid-area: auto; justify-self: start; }
	dialog .dp-text { white-space: normal; }
	.sy-follow { white-space: normal; }
}
.sy-settled .sy-hunk-head b { visibility: hidden; }
dialog.dlg:focus { outline: none; }
