@use "../abstracts/variables" as *;

/**
 * -----------------------------------------------------------------------------
 * Unified Dashboard Range Selector
 * -----------------------------------------------------------------------------
 * Shared pill-style range selector used across dashboard tabs.
 * -----------------------------------------------------------------------------
 */

.no-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-top: 0;

  &__spacer {
    flex: 1 1 auto;
    min-width: 0;
  }

  &__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
  }
}

.no-range-selector {
  display: inline-flex;
  flex: 0 0 auto;

  &__wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid $color-border;
    border-radius: $radius-pill;
    background: $color-surface-soft;
    box-shadow: $shadow-soft;
  }

  &__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 74px;
    height: 44px;
    padding: 0 18px;
    cursor: pointer;
    transition:
      background-color 0.2s ease,
      color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
    text-align: center;
    white-space: nowrap;
    text-decoration: none !important;
    color: $color-text-soft;
    border: 0;
    border-radius: $radius-pill;
    background: transparent;
    font-size: $font-size-sm;
    font-weight: 700;
    line-height: 1;
    appearance: none;

    &:link,
    &:visited,
    &:hover,
    &:focus,
    &:active {
      text-decoration: none !important;
    }

    &:hover,
    &:focus {
      color: $color-text;
      outline: none;
      background: $color-panel-bg;
    }

    &.is-active {
      color: $color-white;
      background: $color-navy;
      box-shadow: 0 8px 18px $color-modal-shadow;
    }
  }
}

@media (max-width: 767px) {
  .no-dashboard-header {
    &__actions {
      justify-content: flex-start;
      width: 100%;
    }
  }

  .no-range-selector {
    width: 100%;

    &__wrapper {
      overflow-x: auto;
      width: 100%;
      -webkit-overflow-scrolling: touch;
    }

    &__item {
      flex: 0 0 auto;
      min-width: 68px;
      height: 40px;
      padding: 0 16px;
    }
  }
}
