@import "../../theme.scss";

.alertBar-root {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: $border-radius;
  border: 1px solid transparent;
  border-left-width: 3px;
  box-shadow: $shadow-sm;
}

.alertBar-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;

  svg {
    width: 20px;
    height: 20px;
  }
}

.alertBar-message {
  flex: 1;
  font-size: 0.875rem;
  color: $text-primary;
}

.alertBar-actionButton {
  all: unset;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  white-space: nowrap;

  &:disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }
}

.alertBar-dismissButton {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.5;

  svg {
    width: 14px;
    height: 14px;
  }

  &:hover {
    opacity: 1;
  }
}

.alertBar-error {
  background: $error-bg;
  border-color: $red-light;
  border-left-color: $red;

  .alertBar-icon svg {
    fill: $red;
  }

  .alertBar-actionButton {
    background: $red;
    color: #fff;

    &:hover:not(:disabled) {
      background: $red-dark;
    }
  }
}

.alertBar-success {
  background: $success-bg;
  border-color: #a7f3d0;
  border-left-color: #10b981;

  .alertBar-icon svg {
    fill: #10b981;
  }

  .alertBar-actionButton {
    background: #10b981;
    color: #fff;

    &:hover:not(:disabled) {
      background: #059669;
    }
  }
}
