/* === Распорядок дня (инструмент) === */
.main-content:has(.rasporyadok-page) {
  padding-top: 0;
}

.rasporyadok-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 60px;
  width: 100%;
}

.rasporyadok-hint {
  font-size: 12px;
  color: var(--color-on-surface-secondary);
  padding: 4px 4px 8px;
}

.rasporyadok-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rasporyadok-row {
  display: flex;
  flex-direction: column;
  position: relative;
}
.rasporyadok-row--dragging { opacity: 0.4; }
.rasporyadok-row--drag-over .rasporyadok-item {
  outline: 2px dashed var(--color-primary);
  outline-offset: -2px;
}
.rasporyadok-row__body {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 0 4px;
}

.rasporyadok-item__drag {
  width: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  color: var(--color-on-surface-secondary);
  cursor: grab;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.rasporyadok-item__drag:hover {
  background: var(--color-hover);
  color: var(--color-on-surface);
}
.rasporyadok-item__drag:active { cursor: grabbing; }

.rasporyadok-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 22%, transparent);
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.rasporyadok-item:hover {
  border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
}
@keyframes rasporyadokHighlightFade {
  0% {
    background: color-mix(in srgb, var(--color-primary) 38%, transparent);
    border-color: color-mix(in srgb, var(--color-primary) 65%, transparent);
  }
  100% {
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
    border-color: color-mix(in srgb, var(--color-primary) 22%, transparent);
  }
}
.rasporyadok-item--highlight {
  animation: rasporyadokHighlightFade 3s ease-out forwards;
}
.rasporyadok-item__meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--color-on-surface-secondary);
}
.rasporyadok-item__time {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 12px;
}
.rasporyadok-item__duration {
  font-size: 11px;
  color: var(--color-on-surface-secondary);
  white-space: nowrap;
}
.rasporyadok-item__title-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  min-width: 0;
}
.rasporyadok-item__title {
  font-size: 14px;
  line-height: 1.35;
  color: var(--color-on-surface);
  word-break: break-word;
  cursor: text;
  padding: 2px 0;
  border-radius: 4px;
  width: 100%;
  text-align: left;
}
.rasporyadok-item__title:hover {
  background: var(--color-hover);
}
.rasporyadok-item__title-input {
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  padding: 2px 6px;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-on-surface);
  outline: none;
}

.rasporyadok-item__delete,
.rasporyadok-item__delete-placeholder {
  width: 26px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  color: color-mix(in srgb, #f44336 70%, transparent);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.rasporyadok-item__delete:hover {
  background: color-mix(in srgb, #f44336 15%, transparent);
  color: #f44336;
}

.rasporyadok-item__add-btn {
  align-self: flex-start;
  margin-left: 46px;
  width: 48px;
  height: 18px;
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
  color: color-mix(in srgb, var(--color-primary) 60%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rasporyadok-item__add-btn:hover {
  background: color-mix(in srgb, var(--color-primary) 25%, transparent);
  color: var(--color-primary);
}
.rasporyadok-item__add-btn--top {
  border-radius: 6px 6px 0 0;
}
.rasporyadok-item__add-btn--bottom {
  border-radius: 0 0 6px 6px;
}

.rasporyadok-item__resize {
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  touch-action: none;
  margin: 2px 0;
}
.rasporyadok-item__resize-pill {
  width: 50px;
  height: 3px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--color-primary) 40%, transparent);
  transition: background 0.15s, width 0.15s;
}
.rasporyadok-item__resize:hover .rasporyadok-item__resize-pill {
  background: var(--color-primary);
  width: 70px;
}

