identity-switch.css 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .identity-dialog { position: fixed; inset: 0; width: min(960px, calc(100vw - 40px)); max-width: none; max-height: min(820px, calc(100svh - 48px)); margin: auto; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--foreground); box-shadow: var(--shadow-dialog); overflow: hidden; }
  2. .identity-dialog::backdrop { background: var(--overlay); }
  3. .identity-dialog-content { display: flex; flex-direction: column; max-height: min(820px, calc(100svh - 50px)); }
  4. .identity-dialog-header { display: flex; align-items: center; gap: 12px; padding: 22px 24px 18px; }
  5. .identity-dialog-icon, .identity-person-icon { display: grid; place-items: center; flex: none; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
  6. .identity-dialog-icon { width: 44px; height: 44px; }
  7. .identity-dialog-header h2 { margin: 0; font-size: 19px; line-height: 1.5; font-weight: 650; }
  8. .identity-dialog-header p { margin: 3px 0 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.6; }
  9. .identity-close { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-left: auto; border: 0; border-radius: 6px; background: transparent; color: var(--icon); cursor: pointer; }
  10. .identity-close:hover { background: var(--muted); color: var(--foreground); }
  11. .identity-close:focus-visible, .identity-search button:focus-visible, .identity-filters button:focus-visible, .identity-empty button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
  12. .identity-current { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin: 0 24px; padding: 11px 14px; border: 1px solid var(--primary-border); border-radius: 8px; background: var(--primary-soft); color: var(--primary-soft-foreground); font-size: 13px; }
  13. .identity-current strong { color: var(--foreground); font-size: 14px; }
  14. .identity-demo-tag { margin-left: auto; font-size: 12px; }
  15. .identity-toolbar { display: flex; align-items: center; gap: 16px; padding: 18px 24px 10px; }
  16. .identity-search { position: relative; flex: 1; min-width: 180px; }
  17. .identity-search > svg { position: absolute; top: 50%; left: 11px; transform: translateY(-50%); color: var(--icon); pointer-events: none; }
  18. .identity-search > input { padding-left: 34px; padding-right: 32px; font-size: 13px; }
  19. .identity-search > button { position: absolute; top: 50%; right: 5px; display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 4px; background: transparent; color: var(--icon); transform: translateY(-50%); cursor: pointer; }
  20. .identity-search > button:hover { background: var(--muted); }
  21. .identity-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
  22. .identity-filters button { min-height: 32px; padding: 5px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted-foreground); font-size: 13px; cursor: pointer; transition: background .15s, color .15s; }
  23. .identity-filters button:hover { background: var(--muted); color: var(--foreground); }
  24. .identity-filters button[aria-pressed="true"] { border-color: var(--primary-border); background: var(--primary-soft); color: var(--primary-soft-foreground); font-weight: 600; }
  25. .identity-results { display: flex; justify-content: space-between; gap: 12px; padding: 0 24px 10px; color: var(--muted-foreground); font-size: 12px; }
  26. .identity-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 24px 16px; }
  27. .identity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
  28. .identity-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 13px 14px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
  29. .identity-card:hover { border-color: var(--border-hover); background: var(--surface-subtle); }
  30. .identity-card.is-selected { border-color: var(--primary); background: var(--primary-soft); }
  31. .identity-card:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
  32. .identity-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
  33. .identity-person-icon { width: 29px; height: 29px; border-radius: 7px; }
  34. .identity-card-top > strong { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
  35. .identity-current-tag { padding: 2px 5px; border-radius: 4px; background: var(--card); color: var(--primary); font-size: 12px; white-space: nowrap; }
  36. .identity-radio { display: grid; flex: none; place-items: center; width: 17px; height: 17px; margin-left: auto; border: 1px solid var(--input); border-radius: 50%; }
  37. .is-selected .identity-radio { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
  38. .identity-card-title { margin-top: 9px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
  39. .identity-card-login { margin-top: 4px; color: var(--muted-foreground); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
  40. .identity-card-scope { display: block; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); color: var(--text-secondary); font-size: 13px; line-height: 1.65; }
  41. .is-selected .identity-card-scope { border-color: var(--primary-border); }
  42. .identity-empty { display: flex; flex-direction: column; align-items: center; padding: 36px 16px; color: var(--muted-foreground); text-align: center; }
  43. .identity-empty strong { margin-top: 12px; color: var(--foreground); font-size: 14px; }
  44. .identity-empty p { margin: 6px 0 10px; font-size: 13px; }
  45. .identity-empty button { padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--primary); font-size: 13px; cursor: pointer; }
  46. .identity-scope-note { flex: none; margin: 0; padding: 10px 24px; border-top: 1px solid var(--border-subtle); background: var(--surface-subtle); color: var(--muted-foreground); font-size: 12px; line-height: 1.7; }
  47. .identity-error { margin: 0; padding: 8px 24px; color: var(--destructive); font-size: 13px; }
  48. .identity-dialog-footer { display: flex; flex: none; align-items: center; gap: 10px; padding: 15px 24px; border-top: 1px solid var(--border); background: var(--card); }
  49. .identity-dialog-footer > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-right: auto; font-size: 13px; }
  50. .identity-dialog-footer > div > span { color: var(--muted-foreground); }
  51. .identity-dialog-footer > div > strong { color: var(--primary); font-weight: 600; }
  52. @media (max-width: 800px) {
  53. .identity-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  54. .identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  55. }
  56. @media (max-width: 540px) {
  57. .identity-dialog { width: calc(100vw - 24px); max-height: calc(100svh - 24px); border-radius: 10px; }
  58. .identity-dialog-content { max-height: calc(100svh - 26px); }
  59. .identity-dialog-header { padding: 16px; align-items: flex-start; gap: 9px; }
  60. .identity-dialog-icon { width: 35px; height: 35px; border-radius: 8px; }
  61. .identity-dialog-header h2 { font-size: 17px; }
  62. .identity-current { margin: 0 16px; gap: 5px 8px; }
  63. .identity-current > span:nth-last-child(2) { flex-basis: 100%; order: 1; }
  64. .identity-toolbar { padding: 14px 16px 10px; }
  65. .identity-filters { gap: 3px; }
  66. .identity-filters button { padding: 5px 7px; font-size: 12px; }
  67. .identity-results { padding: 0 16px 10px; }
  68. .identity-results > span { display: none; }
  69. .identity-scroll { padding: 2px 16px 14px; }
  70. .identity-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  71. .identity-scope-note { padding: 9px 16px; }
  72. .identity-dialog-footer { flex-wrap: wrap; padding: 12px 16px; }
  73. .identity-dialog-footer > div { flex-basis: 100%; }
  74. .identity-dialog-footer > button { flex: 1; }
  75. }