/* Scheduled company changes (MHD-957) — Companies drawer section + modal.
   Kept in its own sheet rather than added to admin-data-table.css: this is
   drawer + dialog chrome, not table styling, and the drawer sheet is already
   carrying several features. */

/* ---------------------------------------------------------- drawer ------ */

.admin-scheduled-change-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-scheduled-change-active {
  padding: 12px;
  border: 1px solid var(--sl-color-neutral-200);
  border-radius: var(--sl-border-radius-medium);
  background: var(--sl-color-neutral-50);
}

.admin-scheduled-change-when {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.92em;
}

.admin-scheduled-change-when sl-icon {
  color: var(--sl-color-neutral-500);
}

/* ----------------------------------------------------------- modal ------ */

.admin-scheduled-change-dialog::part(panel) {
  max-width: 720px;
  width: 92vw;
}

.admin-scheduled-change-dialog .sc-h {
  margin: 4px 0 10px 0;
}

.admin-scheduled-change-dialog .sc-h .hint {
  font-weight: 400;
}

/* Three across on the schedule row; the date and time inputs are narrow and
   the timezone label is long, so it takes the remaining space. */
.sc-schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 12px;
}

.sc-tz-hint {
  margin: 6px 0 0 0;
}

.sc-current-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  font-size: 0.92em;
}

.sc-new-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Secondary listings: ticker + exchange side by side with the remove control
   pinned to the end, so the rows line up however many there are. */
.sc-ticker-rows {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-ticker-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--sl-color-neutral-200);
  border-radius: var(--sl-border-radius-medium);
  background: var(--sl-color-neutral-50);
}

/* Execute Now sits apart from the destructive/primary pair: it is the only
   control in this dialog that writes to the live company record. */
.sc-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-footer-spacer {
  flex: 1;
}

@media (max-width: 640px) {
  .sc-schedule-grid,
  .sc-new-grid,
  .sc-current-grid,
  .sc-ticker-row {
    grid-template-columns: 1fr;
  }
  .sc-footer {
    flex-wrap: wrap;
  }
}

/* The required marker, and the line naming what is still missing.
   The marker rides a `label` slot rather than the `label` attribute, which is
   plain text and could not carry this colour. */
.admin-scheduled-change-dialog .sc-req {
  color: var(--sl-color-danger-600);
  font-weight: 600;
}

.admin-scheduled-change-dialog .sc-required-hint {
  margin: 12px 0 0;
  color: var(--sl-color-danger-700);
}
