/* Add Board modal — styles from new-design/modal.css, scoped to :is(#addBoard, #editBoard) */

:is(#addBoard, #editBoard) .modal-dialog {
  max-width: min(560px, 100%);
  margin: 1.75rem auto;
}

:is(#addBoard, #editBoard) .modal-content {
  border: none;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

:is(#addBoard, #editBoard) .container-add-popup {
  width: min(560px, 100%);
  background-color: #fff;
  border-radius: 16px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  padding: 0;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

:is(#addBoard, #editBoard) .header-style-add-board {
  border-bottom: 1px solid #eef0f4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 24px;
}

:is(#addBoard, #editBoard) .title-id-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

:is(#addBoard, #editBoard) .cancel-icon-board {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

:is(#addBoard, #editBoard) .icon-board-label {
  width: 48px;
  height: 48px;
  background-color: #eeeaff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6d5efc;
  flex-shrink: 0;
}

:is(#addBoard, #editBoard) .icon-board-label .material-symbols-outlined {
  font-size: 24px;
}

:is(#addBoard, #editBoard) .title-desc-board {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
  min-width: 0;
}

:is(#addBoard, #editBoard) .title-add-board {
  font-size: 1.25rem;
  font-weight: 500;
  color: #1a1c21;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}

:is(#addBoard, #editBoard) .description-title-add-board {
  font-size: 0.875rem;
  font-weight: 400;
  color: #8b93a7;
  line-height: 1.45;
  margin: 0;
}

:is(#addBoard, #editBoard) .icon-cancel {
  width: 34px;
  height: 34px;
  background-color: #f4f5f8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: background 0.15s ease;
}

:is(#addBoard, #editBoard) .cancel-icon-board:hover .icon-cancel {
  background-color: #e8eaef;
}

:is(#addBoard, #editBoard) .icon-cancel .material-symbols-outlined {
  font-size: 20px;
}

:is(#addBoard, #editBoard) .content-board-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 24px;
}

:is(#addBoard, #editBoard) .user-board-name-structure,
:is(#addBoard, #editBoard) .board-description {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

:is(#addBoard, #editBoard) .board-name-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1c21;
  margin: 0;
}

:is(#addBoard, #editBoard) .permanent-color-star {
  color: #ef4444;
}

:is(#addBoard, #editBoard) .placeholader-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1.5px solid #ddd6fe;
  border-radius: 10px;
  background: #fff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

:is(#addBoard, #editBoard) .placeholader-container:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

:is(#addBoard, #editBoard) .icon-palc {
  width: 36px;
  height: 36px;
  background-color: #eeeaff;
  border-radius: 8px;
  color: #6d5efc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 500;
  flex-shrink: 0;
}

:is(#addBoard, #editBoard) .placeholader-container > input {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 0.875rem;
  color: #1a1c21;
  padding: 0 !important;
  border-radius: 0 !important;
}

:is(#addBoard, #editBoard) .placeholader-container > input::placeholder {
  color: #9ca3af;
}

:is(#addBoard, #editBoard) .board-description-structure {
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

:is(#addBoard, #editBoard) .board-description-structure:focus-within {
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

:is(#addBoard, #editBoard) .rl-rich-editor > ngx-editor-menu,
:is(#addBoard, #editBoard) .edit-section-label {
  display: block;
  background: #f4f6fb;
  border-bottom: 1px solid #e8ecf3;
  border-radius: 12px 12px 0 0;
  padding: 6px 8px;
}

:is(#addBoard, #editBoard) .enter-description-label {
  flex: 1;
  min-height: 120px;
  padding: 0;
}

:is(#addBoard, #editBoard) .rl-rich-editor .NgxEditor__MenuBar,
:is(#addBoard, #editBoard) .NgxEditor__MenuBar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 2px !important;
  background: transparent !important;
  border: none !important;
  padding: 2px !important;
  cursor: default;
}

:is(#addBoard, #editBoard) .NgxEditor__MenuItem,
:is(#addBoard, #editBoard) .NgxEditor__Dropdown {
  border-radius: 8px !important;
  min-height: 32px;
}

:is(#addBoard, #editBoard) .NgxEditor__MenuItem.NgxEditor__MenuItem--Icon {
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  color: #475569 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

:is(#addBoard, #editBoard) .NgxEditor__MenuItem:hover,
:is(#addBoard, #editBoard) .NgxEditor__Dropdown:hover {
  background: rgba(99, 91, 255, 0.1) !important;
}

:is(#addBoard, #editBoard) .NgxEditor__MenuItem.NgxEditor__MenuItem--Active,
:is(#addBoard, #editBoard) .NgxEditor__MenuItem .NgxEditor__MenuItem--Active,
:is(#addBoard, #editBoard) .NgxEditor__Dropdown--Selected,
:is(#addBoard, #editBoard) .NgxEditor__Dropdown--Open {
  background: rgba(99, 91, 255, 0.16) !important;
  color: #4f46e5 !important;
}

:is(#addBoard, #editBoard) .NgxEditor__Seperator {
  height: 20px;
  margin: 0 4px !important;
  border-left-color: #d7deea !important;
}

:is(#addBoard, #editBoard) .NgxEditor__Popup,
:is(#addBoard, #editBoard) .NgxEditor__Dropdown--DropdownMenu {
  z-index: 1080 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14) !important;
  overflow: hidden;
}

:is(#addBoard, #editBoard) .rl-rich-editor > ngx-editor,
:is(#addBoard, #editBoard) .enter-description-label ngx-editor,
:is(#addBoard, #editBoard) .board-description-structure ngx-editor {
  display: block;
  min-height: 128px;
}

:is(#addBoard, #editBoard) .NgxEditor {
  border: none !important;
  min-height: 128px !important;
  height: auto !important;
  border-radius: 0 0 12px 12px !important;
  background: #fff !important;
  color: #1a1c21 !important;
  padding: 12px 14px !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

:is(#addBoard, #editBoard) .NgxEditor__Content,
:is(#addBoard, #editBoard) .NgxEditor .ProseMirror {
  min-height: 104px !important;
  height: auto !important;
  max-height: 220px;
  overflow-y: auto !important;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #1a1c21 !important;
  caret-color: #4f46e5;
  outline: none !important;
  cursor: text !important;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

:is(#addBoard, #editBoard) .NgxEditor__Content p {
  margin: 0 0 0.55em;
  color: inherit !important;
}

:is(#addBoard, #editBoard) .NgxEditor__Placeholder:before,
:is(#addBoard, #editBoard) .NgxEditor__Content .ProseMirror p.is-editor-empty:first-child::before,
:is(#addBoard, #editBoard) .NgxEditor__Content [data-placeholder]::before {
  color: #9ca3af !important;
}

:is(#addBoard, #editBoard) .footer-add-board-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
}

:is(#addBoard, #editBoard) .cancel-btn-board {
  padding: 10px 18px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

:is(#addBoard, #editBoard) .cancel-btn-board:hover {
  background: #f9fafb;
}

:is(#addBoard, #editBoard) .add-btn-board {
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: #0c6af4;
  border: none;
  color: #fff;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

:is(#addBoard, #editBoard) .add-btn-board:hover:not(:disabled) {
  background-color: #2580f7;
}

:is(#addBoard, #editBoard) .add-btn-board:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

:is(#addBoard, #editBoard) .add-btn-board > .material-symbols-outlined {
  font-size: 18px;
}

/* —— Dark mode —— */
html[data-theme="dark"] :is(#addBoard, #editBoard) .modal-content {
  background: transparent !important;
  border: none !important;
  color: var(--rl-ink, #f1f5f9);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .container-add-popup {
  background: var(--rl-surface, #1e293b);
  border: 1px solid var(--rl-border, #334155);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .header-style-add-board {
  border-bottom-color: var(--rl-border, #334155);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .icon-board-label {
  background: rgba(109, 94, 252, 0.18);
  color: #a5a0ff;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .title-add-board {
  color: var(--rl-ink, #f1f5f9);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .description-title-add-board {
  color: var(--rl-muted, #94a3b8);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .icon-cancel {
  background-color: #334155;
  color: var(--rl-muted, #94a3b8);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .cancel-icon-board:hover .icon-cancel {
  background-color: #475569;
  color: var(--rl-ink, #f1f5f9);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .board-name-label {
  color: var(--rl-ink, #f1f5f9);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .placeholader-container {
  background: var(--rl-search-bg, #0f172a);
  border-color: var(--rl-border, #334155);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .placeholader-container:focus-within {
  border-color: rgba(12, 106, 244, 0.55);
  box-shadow: 0 0 0 3px rgba(12, 106, 244, 0.16);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .icon-palc {
  background: rgba(109, 94, 252, 0.18);
  color: #a5a0ff;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .placeholader-container > input {
  color: var(--rl-ink, #f1f5f9) !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .placeholader-container > input::placeholder {
  color: var(--rl-muted, #94a3b8);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .board-description-structure {
  background: var(--rl-search-bg, #0f172a);
  border-color: var(--rl-border, #334155);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .board-description-structure:focus-within {
  border-color: rgba(12, 106, 244, 0.45);
  box-shadow: 0 0 0 3px rgba(12, 106, 244, 0.12);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .rl-rich-editor > ngx-editor-menu,
html[data-theme="dark"] :is(#addBoard, #editBoard) .edit-section-label {
  background: #1e293b;
  border-bottom-color: var(--rl-border, #334155);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuBar {
  background: transparent !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuBar .NgxEditor__MenuItem,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuBar button,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuBar .NgxEditor__Dropdown,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuItem--Icon {
  color: #94a3b8 !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuItem:hover,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Dropdown:hover,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuBar button:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuItem.NgxEditor__MenuItem--Active,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__MenuItem .NgxEditor__MenuItem--Active,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Dropdown--Selected,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Dropdown--Open {
  background: rgba(12, 106, 244, 0.18) !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Seperator {
  border-left-color: #334155 !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Popup,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Dropdown--DropdownMenu {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Content,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Content p,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor .ProseMirror,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor .ProseMirror p {
  color: #f1f5f9 !important;
  caret-color: #60a5fa;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Placeholder:before,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Content .ProseMirror p.is-editor-empty:first-child::before,
html[data-theme="dark"] :is(#addBoard, #editBoard) .NgxEditor__Content [data-placeholder]::before {
  color: #94a3b8 !important;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .cancel-btn-board {
  background: transparent;
  border-color: #334155;
  color: #cbd5e1;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .cancel-btn-board:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .add-btn-board {
  background: #0c6af4;
  color: #fff;
  box-shadow: 0 6px 16px rgba(12, 106, 244, 0.28);
}

html[data-theme="dark"] :is(#addBoard, #editBoard) .add-btn-board:hover:not(:disabled) {
  background: #2580f7;
}
