/* ---------------------------------------------------------------------------
   Task side panel
   --------------------------------------------------------------------------- */
.panel-scrim {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

.panel-scrim.is-open {
  opacity: 1;
}

.task-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 410;
  width: min(var(--panel-width), 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-panel);
  transform: translateX(24px);
  opacity: 0;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.task-panel.is-open {
  transform: none;
  opacity: 1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 10px 0 20px;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.panel-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: var(--text-3);
}

.panel-crumb a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-crumb a:hover {
  color: var(--text);
}

.panel-crumb > span {
  color: var(--text-2);
  white-space: nowrap;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 36px;
}

.panel-title-input {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 18px;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  font-size: 27px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.panel-title-input::placeholder {
  color: var(--text-4);
}

.panel-body > .form-error {
  margin: -10px 0 14px;
}

.done-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: rgba(95, 180, 136, 0.09);
  border: 1px solid rgba(95, 180, 136, 0.22);
}

.done-banner-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-2);
}

.done-banner-text strong {
  color: var(--status-done);
  font-weight: 600;
}

/* Notion-style property list */
.props {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.prop {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
}

.prop-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-3);
}

.prop-value {
  min-width: 0;
  font-size: 14.5px;
}

.prop-button {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 0 8px;
  margin-left: -8px;
  border-radius: var(--radius);
  text-align: left;
  transition: background-color 100ms var(--ease);
}

.prop-button:hover,
.prop-button[aria-expanded="true"] {
  background: var(--bg-hover);
}

.prop-static {
  color: var(--text-2);
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.person > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person.is-empty {
  color: var(--text-3);
}

.panel-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-3);
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 12px 20px;
  border-top: 1px solid var(--border);
  flex: none;
}

.panel-footer-note {
  font-size: 12.5px;
  color: var(--text-3);
}

.task-panel.is-dirty .panel-footer-note {
  color: #e3b04b;
}

.panel-footer-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 720px) {
  .task-panel {
    border-left: 0;
  }

  .panel-body {
    padding: 20px 16px 28px;
  }

  .prop {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .panel-footer {
    padding: 10px 12px 10px 16px;
  }

  .panel-footer-note kbd,
  .panel-footer-note {
    display: none;
  }

  .panel-footer-actions {
    margin-left: auto;
  }
}
