/*
 * Dash loads this file automatically from the app assets folder. These rules
 * support the shared table and plot download UI.
 *
 * Inline container styles only lay out the wrapper Div. These rules target
 * Dropdown internals and button interaction states, which cannot be reached
 * from the wrapper style.
 */

/* Normalise Dash Dropdown internals so it aligns with the Download button. */
.download-format {
  box-sizing: border-box;
  height: 30px;
}

.download-format .Select {
  box-sizing: border-box;
  min-height: 30px;
  height: 30px;
}

.download-format .Select-control {
  box-sizing: border-box;
  min-height: 30px;
  height: 30px;
  border: 1px solid #8aa1b4;
  border-radius: 6px;
  box-shadow: none;
}

.download-format .Select-placeholder,
.download-format .Select--single > .Select-control .Select-value {
  line-height: 28px;
  color: #243746;
  padding-left: 10px;
}

.download-format .Select-input {
  height: 28px;
}

.download-format .Select-input > input {
  line-height: 28px;
  padding-top: 0;
  padding-bottom: 0;
}

.download-format .Select-arrow-zone {
  width: 24px;
  padding-top: 0;
  padding-bottom: 0;
}

/* Small primary action used next to the format dropdown. */
.download-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #0b5cad;
  border-radius: 6px;
  background: #0b73d9;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(15 23 42 / 18%);
  cursor: pointer;
  vertical-align: top;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

/* Interaction states mirror the app's restrained blue action styling. */
.download-button:hover {
  background: #095fb5;
  border-color: #084f96;
  box-shadow: 0 2px 5px rgb(15 23 42 / 24%);
}

.download-button:active {
  background: #084f96;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 28%);
}

.download-button:focus-visible,
.download-format .Select.is-focused > .Select-control {
  outline: 2px solid #8ec5ff;
  outline-offset: 2px;
}
