:host(:not(:is([hydrated], .hydrated))) {
  @apply not-hydrated;
}


mds-button {
  &:not(:is([hydrated], .hydrated)) {
    @apply not-hydrated;
  }
}


/**
 * @prop --mds-date-range-preselection-default-background: Background used for the default (unselected) preselection state
 * @prop --mds-date-range-preselection-default-border: Border color used for the default preselection state
 * @prop --mds-date-range-preselection-default-color: Text color used in the default preselection state
 * @prop --mds-date-range-preselection-selected-background: Background used for the selected preselection state
 * @prop --mds-date-range-preselection-selected-border: Border color used for the selected preselection state
 * @prop --mds-date-range-preselection-selected-color: Text color used in the selected preselection state
 * @prop --mds-date-range-preselection-hover-background: Background used when a preselection item is hovered
 * @prop --mds-date-range-preselection-hover-border: Border color used on hover state
 * @prop --mds-date-range-preselection-hover-color: Text color used on hover state
 */

:host {
  --mds-date-range-preselection-default-background: rgb(var(--magma-wash-strong, var(--tone-neutral-08, 208 208 208)) / 0);
  --mds-date-range-preselection-default-border: var(--magma-border-default, var(--border-neutral-default, 183 183 183));
  --mds-date-range-preselection-default-color: rgb(var(--magma-text-muted, var(--text-neutral-muted, 73 73 73)));
  --mds-date-range-preselection-selected-background: rgb(var(--magma-accent-emphasis-hover, var(--variant-primary-03, 0 73 211)));
  --mds-date-range-preselection-selected-border: var(--magma-accent-emphasis-hover, var(--variant-primary-03, 0 73 211));
  --mds-date-range-preselection-selected-color: rgb(var(--magma-text-on-emphasis, var(--tone-neutral-seed, 255 255 255)));
  --mds-date-range-preselection-hover-background: rgb(var(--magma-wash-soft, var(--tone-neutral-10, 237 237 237)));
  --mds-date-range-preselection-hover-border: var(--magma-wash-soft, var(--tone-neutral-10, 237 237 237));
  --mds-date-range-preselection-hover-color: rgb(var(--magma-text-muted, var(--text-neutral-muted, 73 73 73)));

  /* private */
  --mds-date-range-preselection-background: var(--mds-date-range-preselection-default-background, rgb(var(--magma-wash-strong, var(--tone-neutral-08, 208 208 208)) / 0));

  /* private */
  --mds-date-range-preselection-border: var(--mds-date-range-preselection-default-border, var(--magma-border-default, var(--border-neutral-default, 183 183 183)));

  /* private */
  --mds-date-range-preselection-color: var(--mds-date-range-preselection-default-color, rgb(var(--magma-text-muted, var(--text-neutral-muted, 73 73 73))));

  display: inline-flex;
  justify-self: start;
}

:host .action {
  --mds-button-background: var(--mds-date-range-preselection-background);
  --mds-button-border-color-rgb: var(--mds-date-range-preselection-border);
  --mds-button-color: var(--mds-date-range-preselection-color);
}

:host .action:hover {
  --mds-date-range-preselection-background: var(--mds-date-range-preselection-hover-background, rgb(var(--magma-wash-soft, var(--tone-neutral-10, 237 237 237))));
  --mds-date-range-preselection-border: var(--mds-date-range-preselection-hover-border, var(--magma-wash-soft, var(--tone-neutral-10, 237 237 237)));
  --mds-date-range-preselection-color: var(--mds-date-range-preselection-hover-color, rgb(var(--magma-text-muted, var(--text-neutral-muted, 73 73 73))));
}

:host([selected]) .action {
  --mds-date-range-preselection-background: var(--mds-date-range-preselection-selected-background, rgb(var(--magma-accent-emphasis-hover, var(--variant-primary-03, 0 73 211))));
  --mds-date-range-preselection-border: var(--mds-date-range-preselection-selected-border, var(--magma-accent-emphasis-hover, var(--variant-primary-03, 0 73 211)));
  --mds-date-range-preselection-color: var(--mds-date-range-preselection-selected-color, rgb(var(--magma-text-on-emphasis, var(--tone-neutral-seed, 255 255 255))));

  pointer-events: none;
}
