.space-published-date-btn {
  width: 100%;
  justify-content: space-between;
}

.space-date-dialog {
  --space-date-pad: 1rem;
  --space-date-pad-wide: 1.125rem;
  --space-date-control-height: 2.75rem;
  --space-date-dialog-width: 32.5rem;
  border: 0;
  padding: 0;
  border-radius: var(--r-md);
  width: min(var(--space-date-dialog-width), calc(100vw - 2rem));
  color: var(--text);
}

.space-date-dialog::backdrop {
  background: color-mix(in srgb, var(--brand-dark) 45%, transparent);
}

.space-date-card header,
.space-date-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-date-pad) var(--space-date-pad-wide);
  border-bottom: 1px solid var(--border);
}

.space-date-card header button {
  border: 0;
  background: transparent;
  font-size: 1.625rem;
  cursor: pointer;
}

.space-date-options {
  max-height: 20.625rem;
  overflow: auto;
  padding: 0.5rem var(--space-date-pad-wide);
}

.space-date-options label {
  display: flex;
  gap: 0.625rem;
  padding: 0.6875rem 0;
  cursor: pointer;
}

.space-date-custom {
  padding: 0.5rem var(--space-date-pad-wide) var(--space-date-pad);
  background: var(--hover-tint);
}

.space-date-custom label {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.space-date-custom input {
  min-height: var(--space-date-control-height);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.625rem;
  background: var(--surface);
}

.space-date-custom p {
  color: var(--danger, var(--text));
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.space-date-card footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  gap: 0.625rem;
}

.space-date-card footer button {
  min-height: 2.625rem;
  border-radius: var(--r-sm);
  padding: 0 var(--space-date-pad);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.space-date-card footer .space-date-apply {
  background: var(--brand-dark);
  color: var(--surface);
  border-color: var(--brand-dark);
}

@media (max-width: 37.5rem) {
  .space-date-dialog {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: var(--r-md) var(--r-md) 0 0;
  }

  .space-date-options {
    max-height: 42vh;
  }
}
