/* ================================
   Базовые ограничения страницы
   ================================ */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ================================
   Шапка и общие блоки layout
   ================================ */

#sys-main-area {
  margin-top: 20px;
}

#sys-logo-area {
  min-height: 50px;
  margin-bottom: 0;
}

#sys-logo-area .dropdown {
  line-height: 25px;
}

.dryHeaderLogo {
  margin: 0;
  line-height: 40px;
  white-space: nowrap;
}

#header .dryMainNavigation {
  margin-left: 3rem;
}

/* Dropdown-часть хлебных крошек в заголовке страницы. */
.dryTitleDropdown.ui.dropdown {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: rgba(0, 0, 0, 0.62);
}

.dryTitleDropdown.ui.dropdown > .text {
  display: inline;
  color: inherit;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.45);
}

.dryTitleDropdown.ui.dropdown:hover,
.dryTitleDropdown.ui.dropdown:focus {
  color: rgba(0, 0, 0, 0.78);
}

.dryTitleDropdown.ui.dropdown .menu {
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.2;
}

/* ================================
   FAB "Новая задача"
   ================================ */
.dryHeaderTaskFab.dryTaskFabButton,
#dryNewTaskFabMobile.dryTaskFabButton {
  position: fixed;
  right: calc(24px + var(--dry-scrollbar-offset, 0px));
  bottom: 24px;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: #fff !important;
  background: #2185d0 !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.23);
  z-index: 900;
  transition: box-shadow 180ms ease, background-color 180ms ease;
  display: none;
}

body.dimmable.dimmed .dryHeaderTaskFab.dryTaskFabButton,
body.dimmable.dimmed #dryNewTaskFabMobile.dryTaskFabButton {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.dryHeaderTaskFab.dryTaskFabButton::before,
#dryNewTaskFabMobile.dryTaskFabButton::before {
  content: "+";
  font-size: 2.1rem;
  font-weight: 300;
  line-height: 1;
  margin-top: -2px;
}

.dryHeaderTaskFab.dryTaskFabButton:hover,
.dryHeaderTaskFab.dryTaskFabButton:focus-visible,
#dryNewTaskFabMobile.dryTaskFabButton:hover,
#dryNewTaskFabMobile.dryTaskFabButton:focus-visible {
  background: #1678c2 !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.dryHeaderTaskFab.dryTaskFabButton.is-visible,
#dryNewTaskFabMobile.dryTaskFabButton.is-visible {
  display: flex;
}

/* ================================
   Модалка задачи и скролл-контент
   ================================ */
body > .pusher {
    min-height: 100vh;
}
.flyout-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    visibility: hidden;
}
.flyout-frame-shell {
    position: relative;
    width: 100%;
    height: var(--ui-flyout-loader-height, 220px);
    overflow: hidden;
    transition: height 260ms ease;
}
.flyout-frame-loader {
    position: absolute;
    inset: 0;
    z-index: 2;
}
.flyout-frame-loader > .ui.dimmer {
    position: absolute !important;
    inset: 0;
    margin: 0 !important;
}
.ui.flyout, .ui.flyout >.content {
    padding: 0 !important;
}
.uiFlyMargin {
    --ui-flyout-side-gap: 5%;
    --ui-flyout-max-width: 1920px;
    --ui-flyout-width: min(calc(100% - var(--ui-flyout-side-gap) - var(--ui-flyout-side-gap)), var(--ui-flyout-max-width));
    --ui-flyout-top-gap: 56px;
    --ui-flyout-loader-height: 220px;
    --ui-flyout-transition-duration: 320ms;
    --ui-flyout-viewport-height: var(--dry-visual-viewport-height, 100dvh);
}
.ui.bottom.flyout.uiFlyMargin {
    left: calc((100% - var(--ui-flyout-width)) / 2) !important;
    right: auto !important;
    width: var(--ui-flyout-width) !important;
    max-width: var(--ui-flyout-max-width);
    max-height: calc(var(--ui-flyout-viewport-height) - var(--ui-flyout-top-gap));
    margin: 0 !important;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
}
.ui.bottom.flyout.uiFlyMargin.is-frame-ready .flyout-frame-shell {
    height: calc(var(--ui-flyout-viewport-height) - var(--ui-flyout-top-gap));
}
.animating.ui.overlay.flyout.uiFlyMargin,
.ui.visible.overlay.flyout.uiFlyMargin {
    transition: transform var(--ui-flyout-transition-duration) ease !important;
}
body.pushable > .ui.flyout.uiFlyMargin ~ .pusher::after {
    transition: opacity var(--ui-flyout-transition-duration) ease !important;
}

@media (max-width: 768px) {
  .uiFlyMargin {
    --ui-flyout-side-gap: 0px;
    --ui-flyout-top-gap: max(44px, calc(env(safe-area-inset-top) + 20px));
  }

  .ui.bottom.flyout.uiFlyMargin {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }
}

/* ================================
   Мобильное меню
   ================================ */
#mobileMenuToggle {
  color: #999;
  font-size: 80%;
  cursor: pointer;
  display: none;
}

@media (max-width: 768px) {
  #header .dryMainNavigation {
    display: none !important;
  }

  #header #mobileMenuToggle {
    display: inline-block !important;
  }

  #dryNewTaskFabMobile.dryTaskFabButton {
    right: calc(16px + var(--dry-scrollbar-offset, 0px));
    bottom: 16px;
  }
}

/* ================================
   Вспомогательные утилиты
   ================================ */
.text-uppercase {
  text-transform: uppercase;
}

.dryClipboard {
  cursor: pointer;
  border-bottom: 1px dotted currentColor;
}

.dryClipboard:hover,
.dryClipboard:focus {
  color: rgba(0, 0, 0, 0.78);
}
.dryEmptyContent {
  font-style: italic;
  color: #7b7b7b;
}

/* ================================
   Формы
   ================================ */
.form-error-mssg {
  margin: 5px 0 0;
  line-height: 15px;
}

.dry-remote.dropdown:not(.multiple) > .text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.ui.dropdown .menu > .message {
  /* padding: 0 !important; */
}

.ui.dropdown .menu > .message > .ui.message {
  margin: 0;
  box-shadow: none !important;
}

.ui.dropdown .menu > .message > .ui.message,
.ui.dropdown .menu > .message > .ui.message p {
  white-space: normal;
}

/* Легкий inline-picker для быстрых правок в карточках. */
.dryInlinePicker {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
}

.dryInlinePickerTrigger {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #000;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.55);
  cursor: pointer;
  line-height: 1.25;
  white-space: nowrap;
}

.dryInlinePickerTrigger:hover,
.dryInlinePickerTrigger:focus {
  color: #000;
  border-bottom-color: #000;
}

.dryInlinePickerTrigger img,
.dryInlinePickerTrigger .icon {
  flex: 0 0 auto;
}

.dryInlinePickerTriggerText {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dryInlinePickerMenu {
  display: none !important;
  position: fixed;
  z-index: 1000;
  min-width: 16rem;
  max-height: 18rem;
  margin: 0 !important;
  overflow-y: auto;
}

.dryInlinePicker.is-open .dryInlinePickerMenu {
  display: block !important;
}

.dryInlinePickerSearch {
  padding: .55rem .75rem;
  border-bottom: 1px solid rgba(34, 36, 38, .1);
}

.dryInlinePickerSearch .input {
  width: 100%;
}

.dryInlinePickerEmpty {
  padding: .75rem 1rem;
  color: rgba(0, 0, 0, .45);
}

.dryInlinePickerError {
  display: none;
  margin-top: .35rem;
  color: #9f3a38;
  font-size: .82rem;
}

.dryInlinePicker.has-error + .dryInlinePickerError,
.dryInlinePicker.has-error .dryInlinePickerError {
  display: block;
}

.dryInlinePicker.is-saving .dryInlinePickerTrigger {
  opacity: .65;
  pointer-events: none;
}

.dryInlinePicker.is-saving .dryInlinePickerTrigger::after {
  content: "";
  flex: 0 0 auto;
  width: .8rem;
  height: .8rem;
  margin-left: .4rem;
  border: 2px solid rgba(0, 0, 0, .18);
  border-top-color: rgba(0, 0, 0, .72);
  border-radius: 50%;
  animation: dryInlinePickerSpin 700ms linear infinite;
}

.dryTaskQueueInline .dryInlinePicker.is-saving .dryInlinePickerTrigger::after {
  display: none;
}

.dryInlinePicker.is-saved .dryInlinePickerTrigger {
  border-bottom-color: #21ba45;
}

.dryTaskQueueLoading label::after,
.dryTaskQueueLoading .dryTaskViewMetaLabel::after {
  content: "";
  display: inline-block;
  position: relative;
  top: 0.07em;
  vertical-align: baseline;
  box-sizing: border-box;
  margin: 0 0 0 0.5em;
  width: 0.95em;
  height: 0.95em;
  border: 2px solid rgba(34, 36, 38, 0.2);
  border-top-color: rgba(34, 36, 38, 0.8);
  border-radius: 50%;
  animation: dryInlinePickerSpin 0.65s linear infinite;
}

.dryTaskQueueRankButton {
  float: right;
  color: rgba(0, 0, 0, .55);
}

.dryTaskQueueRankButton:hover {
  color: rgba(0, 0, 0, .85);
}

#dryTaskQueuePositionModal .dryTaskQueuePositionFilters {
  margin-bottom: 0.75rem;
}

#dryTaskQueuePositionModal > .scrolling.content {
  min-height: min(24rem, 70vh);
}

#dryTaskQueuePositionModal .dryTaskQueuePositionFilterRow {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}

#dryTaskQueuePositionModal .dryTaskQueuePositionFilterRow > .ui.buttons {
  flex: 0 0 auto;
}

#dryTaskQueuePositionModal .dryTaskQueueAssignedFilter {
  flex: 1 1 auto;
  min-width: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

#dryTaskQueuePositionModal .dryTaskQueuePositionFilterRow > .ui.buttons .button:last-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#dryTaskQueuePositionList tbody tr[data-anchor] {
  cursor: pointer;
}

#dryTaskQueuePositionList tbody td .description {
  color: rgba(0, 0, 0, .55);
}

#dryTaskQueuePositionList .dryTaskQueuePositionPlaceholder {
  margin: 0;
  max-width: none;
}

@keyframes dryInlinePickerSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   Редактор
   ================================ */
.ql-editor {
  min-height: 200px; /* Минимальная высота редактора */
}

.dryRichText,
.dryRichText .ql-editor {
  color: #262626;
  font-size: 1rem;
  line-height: 1.55;
}

.ql-snow a,
.ql-snow .ql-editor a,
.dryTaskCommentText a {
  color: #5f666d;
  text-decoration: none;
}

.ql-snow a:hover,
.ql-snow a:focus,
.ql-snow .ql-editor a:hover,
.ql-snow .ql-editor a:focus,
.dryTaskCommentText a:hover,
.dryTaskCommentText a:focus {
  color: #000;
  text-decoration: none;
}

.dryTaskMention,
.dryTaskMention:hover,
.dryTaskMention:focus,
.dryTaskMention a,
.dryTaskMention a:hover,
.dryTaskMention a:focus,
.ql-snow .ql-editor .dryTaskMention,
.ql-snow .ql-editor .dryTaskMention:hover,
.ql-snow .ql-editor .dryTaskMention:focus,
.ql-snow .ql-editor a.dryTaskMention,
.ql-snow .ql-editor a.dryTaskMention:hover,
.ql-snow .ql-editor a.dryTaskMention:focus,
.ql-snow .ql-editor .dryTaskMention a,
.ql-snow .ql-editor .dryTaskMention a:hover,
.ql-snow .ql-editor .dryTaskMention a:focus {
  color: inherit;
  text-decoration: none;
}

.dryTaskCommentForm .ql-toolbar.ql-snow,
.ui.form .field > .ql-toolbar.ql-snow {
  border-color: rgba(34, 36, 38, 0.15);
  border-radius: 0.28571429rem 0.28571429rem 0 0;
}

.dryTaskCommentForm .ql-container.ql-snow,
.ui.form .field > .ql-container.ql-snow {
  border-color: rgba(34, 36, 38, 0.15);
  border-top: 0;
  border-radius: 0 0 0.28571429rem 0.28571429rem;
}

.dryRichText p,
.dryRichText .ql-editor p {
  margin: 0 0 0.65rem;
}

.dryRichText h1,
.dryRichText h2,
.dryRichText h3,
.dryRichText h4,
.dryRichText .ql-editor h1,
.dryRichText .ql-editor h2,
.dryRichText .ql-editor h3,
.dryRichText .ql-editor h4 {
  margin: 1.15rem 0 0.55rem;
  line-height: 1.2;
}

.dryRichText h1,
.dryRichText .ql-editor h1 {
  font-size: 1.65rem;
}

.dryRichText h2,
.dryRichText .ql-editor h2 {
  font-size: 1.35rem;
}

.dryRichText h3,
.dryRichText .ql-editor h3 {
  font-size: 1.15rem;
}

.dryRichText h4,
.dryRichText .ql-editor h4 {
  font-size: 1.05rem;
}

.dryRichText h1:first-child,
.dryRichText h2:first-child,
.dryRichText h3:first-child,
.dryRichText h4:first-child,
.dryRichText .ql-editor h1:first-child,
.dryRichText .ql-editor h2:first-child,
.dryRichText .ql-editor h3:first-child,
.dryRichText .ql-editor h4:first-child {
  margin-top: 0;
}

.dryRichText ul,
.dryRichText ol,
.dryRichText .ql-editor ul,
.dryRichText .ql-editor ol {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.45rem;
}

.dryRichText li,
.dryRichText .ql-editor li {
  margin: 0.2rem 0;
  padding-left: 0.15rem;
}

.dryRichText blockquote,
.dryRichText .ql-editor blockquote {
  margin: 0.8rem 0;
  padding: 0.45rem 0 0.45rem 0.9rem;
  border-left: 3px solid #d4d4d5;
  color: #4f4f4f;
}

.dryRichText pre,
.dryRichText .ql-editor pre {
  margin: 0.8rem 0;
  padding: 0.75rem 0.9rem;
  border-radius: 4px;
  overflow-x: auto;
}

.dryRichText code,
.dryRichText pre,
.dryRichText kbd,
.dryRichText samp,
.dryRichText .ql-editor code,
.dryRichText .ql-editor pre,
.dryRichText .ql-editor .ql-code-block-container,
.dryTaskCommentForm .ql-editor code,
.dryTaskCommentForm .ql-editor pre,
.dryTaskCommentForm .ql-editor .ql-code-block-container,
.dryTaskCommentText code,
.dryTaskCommentText pre {
  font-family: 'JetBrains Mono', monospace;
}

.dryRichText img,
.dryRichText .ql-editor img {
  max-width: 100%;
  height: auto;
}

/* ================================
   Drag-scroll таблицы
   ================================ */
.dragScrollable {
  position: relative;
  width: 100%;
  touch-action: pan-y;
}

.dragScrollable > table {
  position: absolute;
  left: 0;
  will-change: left;
}

.dragScrollable > table th,
.dragScrollable > table td {
  cursor: grab !important;
  user-select: none;
}

.dragScrollable.is-dragging > table th,
.dragScrollable.is-dragging > table td {
  cursor: grabbing !important;
}

.ui.table.dryListTasks thead th {
    text-transform: uppercase;
    font-size: 80%;
    font-weight: bold;
}

.ui.table.dryListTasks th:first-child,
.ui.table.dryListTasks td:first-child {
    padding-left: 1rem !important;
}

.ui.table.dryListTasks th:last-child,
.ui.table.dryListTasks td:last-child {
    padding-right: 1rem !important;
}

.ui.table.dryListTasks>tbody>tr:nth-child(2n),
.dragScrollable #dryListTasks>tbody>tr:nth-child(2n) {
    background-color: rgba(0, 0, 50, 0.02);
}

.ui.table.dryListTasks>tbody>tr:nth-child(2n):hover,
.dragScrollable #dryListTasks>tbody>tr:nth-child(2n):hover {
    background-color: rgba(0, 0, 50, 0.04);
}
.drySuperFancyTextSimple {
    text-transform: uppercase;
    font-family: "JetBrains Mono", monospace;
}
.drySuperFancyTextGrey {
    font-size: 80%;
    text-transform: uppercase;
    font-weight: bold;
    color: #999;
    font-family: "JetBrains Mono", monospace;
}
.drySuperFancyTextBlank {
    font-size: 80%;
    text-transform: uppercase;
    font-weight: bold;
    font-family: "JetBrains Mono", monospace;
}
