/* Domain picker — shared dropdown styling for the create-link modal, the URL list filter, and (Part C) the edit-URL modal. Built on the existing `.dropdown` primitive in dashboard-base.css. */ .domain-picker { position: relative; display: inline-block; min-width: 200px; } .domain-picker-trigger { display: inline-flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-primary); font-size: 13px; font-family: inherit; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; } .domain-picker-trigger:hover { background: rgba(255, 255, 255, 0.05); } .domain-picker-trigger:focus-visible, .domain-picker-trigger.is-active { outline: none; border-color: var(--accent-primary); background: rgba(255, 255, 255, 0.08); } .domain-picker-icon { flex-shrink: 0; color: var(--text-secondary); font-size: 14px; } .domain-picker-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-variant-numeric: tabular-nums; } .domain-picker-chevron { flex-shrink: 0; color: var(--text-secondary); font-size: 14px; transition: transform 0.15s ease; } .domain-picker-trigger.is-active .domain-picker-chevron { transform: rotate(180deg); } .domain-picker-menu { /* Fully opaque — inside the edit modal the form text behind the menu was bleeding through any sub-1.0 alpha, even with backdrop-filter on the base .dropdown-menu. Solid color matches the elevated bluish tone the base picks up in the dashboard's lit areas. */ background: #141932; min-width: 240px; max-height: 280px; overflow-y: auto; padding: 4px; } .domain-picker-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: transparent; border: none; border-radius: 4px; color: var(--text-primary); font-size: 13px; font-family: inherit; cursor: pointer; text-align: left; } .domain-picker-item:hover, .domain-picker-item:focus-visible { outline: none; background: rgba(255, 255, 255, 0.06); } .domain-picker-item.is-selected { background: rgba(168, 85, 247, 0.12); color: #ddd6fe; } .domain-picker-item.is-selected:hover { background: rgba(168, 85, 247, 0.18); } .domain-picker-item > i:first-child { flex-shrink: 0; color: var(--text-secondary); font-size: 13px; } .domain-picker-item.is-selected > i:first-child { color: #c4b5fd; } .domain-picker-fqdn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; } .domain-picker-meta { flex-shrink: 0; font-size: 10.5px; color: var(--text-tertiary, var(--text-secondary)); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; } /* "Add a custom domain" CTA — visually distinct from selectable items. */ .domain-picker-add { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-top: 2px; background: transparent; border: none; border-radius: 4px; color: #c4b5fd; font-size: 13px; text-decoration: none; cursor: pointer; } .domain-picker-add:hover { background: rgba(168, 85, 247, 0.1); color: #ddd6fe; } .domain-picker-add > span { flex: 1; } .domain-picker-add-arrow { flex-shrink: 0; font-size: 13px; transition: transform 0.15s ease; } .domain-picker-add:hover .domain-picker-add-arrow { transform: translateX(2px); } /* ── Prefix variant ────────────────────────────────────────────────────────── Used inside `.input-group` as the alias prefix in the create and edit modals. Takes the place of the static `` and carries the same visual weight, but exposes a dropdown so users can pick a domain without leaving the alias field. */ .domain-picker-prefix { min-width: 0; display: flex; align-items: stretch; } .domain-picker-prefix .domain-picker-trigger { background: rgba(255, 255, 255, 0.1); color: var(--text-secondary); padding: 12px 14px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; border: none; border-right: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0; white-space: nowrap; flex-shrink: 0; gap: 6px; border-top-left-radius: 7px; border-bottom-left-radius: 7px; } .domain-picker-prefix .domain-picker-trigger:hover { background: rgba(255, 255, 255, 0.13); color: var(--text-primary); } .domain-picker-prefix .domain-picker-trigger:focus-visible, .domain-picker-prefix .domain-picker-trigger.is-active { background: rgba(255, 255, 255, 0.13); color: var(--text-primary); outline: none; border-color: rgba(255, 255, 255, 0.1); } .domain-picker-prefix .domain-picker-value { /* Don't let the prefix dominate the input — long fqdns truncate so the alias still has room. */ max-width: 280px; } .domain-picker-prefix .domain-picker-chevron { font-size: 12px; opacity: 0.7; } /* `.input-group` clips overflow so its single border-radius wraps the children cleanly. Selectively raise visibility for groups that contain a picker so the dropdown menu can paint outside the input bounds. */ .input-group:has(.domain-picker-prefix) { overflow: visible; } .domain-picker-prefix .domain-picker-menu { /* Anchor to the prefix's left edge, not the (formerly clipped) input. */ left: 0; right: auto; margin-top: 4px; min-width: 240px; } /* Read-only state — when the user has no custom domains there's nothing to switch to. Suppress the chevron so the trigger doesn't promise an action that won't change anything. JS marks the wrapper via data-readonly. */ .domain-picker-prefix[data-readonly="true"] .domain-picker-chevron { display: none; } .domain-picker-prefix[data-readonly="true"] .domain-picker-trigger { cursor: default; }