/* UX-04 (ux-04\instruction-ux-04-build.md): the styles of assets/ux04.js. Loaded after styles.css. */

/* F1: the desktop menu is always open: icon + label, normal height, the current item highlighted. The phone (760 px and under) keeps its grid. */
@media (min-width: 761px) {
  .app-shell,
  .app-shell:has(.sidebar:hover),
  .app-shell:has(.sidebar:focus-within) {
    grid-template-columns: var(--sidebar-expanded-width) minmax(0, 1fr);
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within {
    width: var(--sidebar-expanded-width);
    padding: 12px 10px;
    box-shadow: none;
  }

  .sidebar:not(:hover):not(:focus-within) .nav-item,
  .sidebar:not(:hover):not(:focus-within) .sidebar-footer,
  .sidebar .nav-item,
  .sidebar .sidebar-footer {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .sidebar .nav-item.hidden {
    display: none;
  }

  .sidebar .nav-list {
    align-content: start;
    grid-auto-rows: max-content;
  }

  .sidebar .nav-list .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    min-height: 44px;
    padding: 0 12px;
  }

  .sidebar .nav-list.ux03a-grouped > .nav-item[data-module] {
    display: none !important;
  }

  .sidebar .nav-list .nav-item.hidden {
    display: none;
  }
}

.ux04-nav-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.ux04-nav-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* F5 */
.ux04-time-message {
  margin: 4px 0 0;
  padding: 8px 10px;
  border: 1px solid #f0b4ae;
  border-radius: 8px;
  background: #fdecea;
  color: #8f1f16;
  font-size: 13px;
  font-weight: 600;
}

/* F7: a stage before the current one with no closing row: hatched, not the plain "to come" fill. */
.ux03b-seg.is-unrecorded {
  background: repeating-linear-gradient(135deg, #b7c4c8 0 3px, transparent 3px 6px);
  box-shadow: inset 0 0 0 1px #94a6ab;
}

/* F8 */
.ux04-row-menu {
  position: relative;
  display: inline-block;
}

.ux04-row-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.ux04-row-menu > summary::-webkit-details-marker {
  display: none;
}

.ux04-row-menu-list {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-width: 140px;
  padding: 6px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

/* E4 */
.ux04-nothing-filled {
  margin: 4px 0 0;
  color: #557075;
  font-size: 14px;
}

/* E5: the Activity composer keeps one text box, one date and one Save; the log row keeps Call, WhatsApp and Visit. */
.ux03b-composer [data-crm03c-row="project"] [data-type="note"] {
  display: none;
}

/* E9 */
.ux04-task-filters.ux04-is-collapsed > :not([data-ux04-keep]) {
  display: none !important;
}

.ux04-filter-toggle {
  align-self: end;
  white-space: nowrap;
}

/* Item 14 */
.ux04-lead-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.ux04-lead-chip {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text-secondary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ux04-lead-chip.is-overdue {
  border-color: var(--red);
}

.ux04-lead-chip.is-today {
  border-color: var(--green);
}

.ux04-lead-chip.is-active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
}

.ux04-lead-chip:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* F8: the access dialog's own per-action fields: .auth-form label { display } outranks .hidden, so a Deactivate step also showed the role, decision and Auth id fields. */
#accessActionForm label.hidden {
  display: none;
}
