@use "../../../styles/variables" as vars;
@use "../../../styles/colors" as colors;
@use "../../../styles/screen" as screen;

.online-board-search {
  &__status {
    padding: vars.$space-m vars.$space-xl;
  }

  &__calendar {
    display: flex;
    gap: vars.$space-s;
    padding: vars.$space-xl;
    overflow-x: auto;

    @include screen.mobile {
      flex-direction: column;
      padding: vars.$space-xl;
    }
  }

  &__error-card {
    background: colors.$white;
    border-radius: vars.$border-radius;
    padding: vars.$space-xl;
    text-align: center;
  }

  &__error-title {
    margin: 0 0 vars.$space-m;
    font-size: 18px;
    color: colors.$red;
  }

  &__error-message {
    margin: 0 0 vars.$space-xl;
    color: #666;
    font-size: 14px;
  }

  &__retry-btn {
    display: inline-block;
    padding: vars.$space-s2 vars.$space-xl;
    background-color: colors.$blue;
    color: colors.$white;
    border: none;
    border-radius: vars.$border-radius;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;

    &:hover {
      opacity: 0.9;
    }
  }

  &__actions {
    display: none;
  }
}

.board-day-selector {
  @include screen.mobile {
    display: flex;
    flex-direction: column;
    padding: vars.$space-xl;
  }
}

.calendar-day {
  padding: vars.$space-s2 vars.$space-m;
  border: 1px solid colors.$border;
  border-radius: vars.$border-radius;
  background: colors.$white;
  cursor: pointer;
  white-space: nowrap;

  &:hover {
    border-color: colors.$blue-light;
  }

  &--active {
    background-color: colors.$blue;
    color: colors.$white;
    border-color: colors.$blue;
  }
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px vars.$space-s2;
  border-radius: vars.$border-radius;
  font-size: 12px;
  font-weight: 500;

  &--live {
    background-color: colors.$green;
    color: colors.$white;
  }

  &--reconnecting {
    background-color: colors.$orange;
    color: colors.$white;
  }

  &--offline {
    background-color: colors.$light-gray;
    color: colors.$white;
  }
}
