@use '../../../../shared/styles/variables' as *;

.add-device-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 110;

  background: $color-backdrop;
  backdrop-filter: blur(2px);

}

.add-device-modal {
  position: fixed;
  z-index: 120;
  top: 50%;
  left: 50%;

  width: min(520px, calc(100vw - 32px));
  padding: 24px;

  border-radius: 24px;
  background: $color-surface;
  box-shadow: $shadow-modal;

  transform: translate(-50%, -50%);
}

.add-device-modal__header {
  margin-bottom: 22px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.add-device-modal__title {
  margin: 0;

  color: $color-text-strong;
  font-size: $font-size-24;
  font-weight: 650;
}

.add-device-modal__description {
  margin: 6px 0 0;

  color: $gray50;
  font-size: $font-size-15;
  font-weight: 400;
  line-height: 1.4;
}

.add-device-modal__close {
  width: 40px;
  height: 40px;

  border: none;
  border-radius: 12px;
  background: $color-bg;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: $gray50;
  cursor: pointer;
  transition: 0.2s ease;

  &:hover {
    color: $blue;
    background: $gray20;
  }
}

.add-device-qr {
  display: flex;
  flex-direction: column;
  gap: 14px;

  p {
    margin: 0;

    color: $gray50;
    font-size: $font-size-14;
    line-height: 1.45;
    text-align: center;
  }
}

.add-device-qr__box {
  min-height: 260px;
  border-radius: 22px;
  border: 1px dashed rgba($color-primary-rgb, 0.32);
  background: $color-bg;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  color: $blue;

  span {
    color: $color-text-strong;
    font-size: $font-size-18;
    font-weight: 600;
  }
  .add-device-qr__state, .add-device-qr__content{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

.add-device-token-timer {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba($color-primary-rgb, 0.08);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  color: $blue;
  font-size: $font-size-15;
  font-weight: 600;

  svg {
    flex: 0 0 auto;
  }

  span {
    min-width: 0;
  }

  button {
    height: 30px;
    margin-left: 4px;
    padding: 0 10px;
    border: none;
    border-radius: 10px;
    background: $color-surface;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: $blue;
    font-size: $font-size-13;
    font-weight: 650;
    cursor: pointer;
    transition: 0.2s ease;

    &:hover {
      background: $blue;
      color: $color-text-inverse;
    }

    &:disabled {
      opacity: 0.55;
      cursor: default;
    }
  }
}

.add-device-token-timer.is-expired {
  background: rgba($color-danger-rgb, 0.1);
  color: $red;

  button {
    color: $red;

    &:hover {
      background: $red;
      color: $color-text-inverse;
    }
  }
}

.add-device-modal__footer {
  margin-top: 22px;

  display: flex;
  justify-content: flex-end;
}

.add-device-cancel {
  height: 42px;
  padding: 0 18px;

  border: none;
  border-radius: 14px;
  background: $color-bg;

  color: $gray50;
  font-size: $font-size-15;
  font-weight: 600;
  cursor: pointer;

  transition: 0.2s ease;

  &:hover {
    background: $gray20;
    color: $color-text-strong;
  }
}
