/* public/css/mobile/op-edit-sheet.css
 * Slide-up edit sheet (DCM Overview tab edit button).
 * All colors via existing --dcm-* tokens from dcm.css (which already flips
 * for body.dark-mode). No hardcoded hex values.
 */

/* ── Backdrop ─────────────────────────────────────────────────────────────── */

.dcm-sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.5);
}

/* ── Sheet panel ─────────────────────────────────────────────────────────── */

.dcm-sheet {
  background: var(--dcm-surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  max-height: 90vh;
  max-height: 90svh; /* progressive — svh wins where supported */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
  animation: dcm-sheet-slide-up 0.28s ease-out;
}

@keyframes dcm-sheet-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Sheet header ────────────────────────────────────────────────────────── */

.dcm-sheet__header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--dcm-border);
}

.dcm-sheet__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dcm-text);
}

.dcm-sheet__close {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
  color: var(--dcm-muted);
  background: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.dcm-sheet__close:active {
  background: var(--dcm-surface-2);
  color: var(--dcm-text);
}

/* ── Scrollable body ─────────────────────────────────────────────────────── */

.dcm-sheet__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

/* dcm-form inside the sheet: shed the card chrome (sheet is the container) */
.dcm-sheet__body .dcm-form {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  gap: 12px;
}

/* ── Sticky action row ───────────────────────────────────────────────────── */

.dcm-sheet__actions {
  flex: none;
  margin-top: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--dcm-border);
  background: var(--dcm-surface);
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .dcm-sheet__actions {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

/* ── Section headings within the edit form ───────────────────────────────── */

.dcm-form__section {
  margin: 20px 0 2px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--dcm-muted);
}

.dcm-form__section:first-child { margin-top: 0; }

/* ── Overview actions row (Edit button) ──────────────────────────────────── */

.dcm-det__ov-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* Compact width — overrides the full-width block default on .dcm-btn */
.dcm-det__ov-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}
